[Scummvm-git-logs] scummvm master -> 5a7bfc3954d85f096db2f385fe4494b642fe1446

dreammaster noreply at scummvm.org
Thu Mar 16 03:40:01 UTC 2023


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:
a3689170ab VOYEUR: Apply German Fan translation patch
42871c7cdb VOYEUR: Change German MD5 based on an email forwarded by Sev
bdb32bfc91 VOYEUR: Fix detection
5a7bfc3954 VOYEUR: Fix occasional issue in hour display


Commit: a3689170ab8468cef2d698257493fcd5e92dd426
    https://github.com/scummvm/scummvm/commit/a3689170ab8468cef2d698257493fcd5e92dd426
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2023-03-15T20:39:53-07:00

Commit Message:
VOYEUR: Apply German Fan translation patch

Changed paths:
    engines/voyeur/animation.h
    engines/voyeur/detection_tables.h
    engines/voyeur/events.cpp
    engines/voyeur/files.cpp
    engines/voyeur/files.h
    engines/voyeur/screen.cpp
    engines/voyeur/staticres.cpp
    engines/voyeur/staticres.h
    engines/voyeur/voyeur.cpp
    engines/voyeur/voyeur_game.cpp


diff --git a/engines/voyeur/animation.h b/engines/voyeur/animation.h
index 4c0cccbcf60..b891b80922c 100644
--- a/engines/voyeur/animation.h
+++ b/engines/voyeur/animation.h
@@ -184,7 +184,7 @@ public:
 	 * @param frames		Optional frame numbers resource for when to apply image data
 	 * @param imgPos		Position to draw image data
 	 */
-	void play(VoyeurEngine *vm, int resourceOffset = 0, byte *frames = NULL, byte *imgPos = NULL);
+	void play(VoyeurEngine *vm, int resourceOffset = 0, byte *frames = nullptr, byte *imgPos = nullptr);
 	RL2VideoTrack *getRL2VideoTrack() { return _videoTrack; }
 	RL2AudioTrack *getRL2AudioTrack() { return _audioTrack; }
 };
diff --git a/engines/voyeur/detection_tables.h b/engines/voyeur/detection_tables.h
index 5ebf672092e..bfa62047538 100644
--- a/engines/voyeur/detection_tables.h
+++ b/engines/voyeur/detection_tables.h
@@ -26,7 +26,7 @@ static const VoyeurGameDescription gameDescriptions[] = {
 		// Voyeur DOS English
 		{
 			"voyeur",
-			0,
+			nullptr,
 			AD_ENTRY1s("bvoy.blt", "12e9e10654171501cf8be3a7aa7198e1", 13036269),
 			Common::EN_ANY,
 			Common::kPlatformDOS,
@@ -48,7 +48,17 @@ static const VoyeurGameDescription gameDescriptions[] = {
 		}
 	},
 
-	{ AD_TABLE_END_MARKER }
-};
+	{// Voyeur German Fan Translation - By Bakhtosh
+	 {
+		 "voyeur",
+		 "German Fan Made Version",
+		 AD_ENTRY1s("bvoy.blt", "12e9e10654171501cf8be3a7aa7198e1", 13036269),
+		 Common::DE_DEU,
+		 Common::kPlatformDOS,
+		 ADGF_NO_FLAGS,
+		 GUIO1(GUIO_NOMIDI)}
+	},
+
+	{AD_TABLE_END_MARKER}};
 
 } // End of namespace Voyeur
diff --git a/engines/voyeur/events.cpp b/engines/voyeur/events.cpp
index 80f2956113a..549f024a54d 100644
--- a/engines/voyeur/events.cpp
+++ b/engines/voyeur/events.cpp
@@ -31,14 +31,14 @@
 namespace Voyeur {
 
 IntNode::IntNode() {
-	_intFunc = NULL;
+	_intFunc = nullptr;
 	_curTime = 0;
 	_timeReset = 0;
 	_flags = 0;
 }
 
 IntNode::IntNode(uint16 curTime, uint16 timeReset, uint16 flags) {
-	_intFunc = NULL;
+	_intFunc = nullptr;
 	_curTime = curTime;
 	_timeReset = timeReset;
 	_flags = flags;
@@ -54,7 +54,7 @@ IntData::IntData() {
 	_skipFading = false;
 	_palStartIndex = 0;
 	_palEndIndex = 0;
-	_palette = NULL;
+	_palette = nullptr;
 }
 
 /*------------------------------------------------------------------------*/
@@ -71,7 +71,7 @@ EventsManager::EventsManager(VoyeurEngine *vm) : _intPtr(_gameData),
 
 	Common::fill(&_cycleTime[0], &_cycleTime[4], 0);
 	Common::fill(&_cycleNext[0], &_cycleNext[4], (byte *)nullptr);
-	_cyclePtr = NULL;
+	_cyclePtr = nullptr;
 
 	_leftClick = _rightClick = false;
 	_mouseClicked = _newMouseClicked = false;
@@ -589,8 +589,13 @@ void EventsManager::stopEvidDim() {
 Common::String EventsManager::getEvidString(int eventIndex) {
 	assert(eventIndex <= _vm->_voy->_eventCount);
 	VoyeurEvent &e = _vm->_voy->_events[eventIndex];
+
+	if (_vm->getLanguage() == Common::DE_DEU)
+		return Common::String::format("%03d %.2d:%.2d %s %s", eventIndex + 1,
+									  e._isAM ? e._hour : e._hour + 12, e._minute, e._isAM ? AM_DE : PM_DE, EVENT_TYPE_STRINGS_DE[e._type - 1]);
+
 	return Common::String::format("%03d %.2d:%.2d %s %s", eventIndex + 1,
-		e._hour, e._minute, e._isAM ? AM : PM, EVENT_TYPE_STRINGS[e._type - 1]);
+		e._hour, e._minute, e._isAM ? AM_EN : PM_EN, EVENT_TYPE_STRINGS_EN[e._type - 1]);
 }
 
 } // End of namespace Voyeur
diff --git a/engines/voyeur/files.cpp b/engines/voyeur/files.cpp
index b2b8a821561..f3d68aaa1a6 100644
--- a/engines/voyeur/files.cpp
+++ b/engines/voyeur/files.cpp
@@ -29,15 +29,15 @@ namespace Voyeur {
 #define BOLT_GROUP_SIZE 16
 
 BoltFilesState::BoltFilesState(VoyeurEngine *vm) : _vm(vm) {
-	_curLibPtr = NULL;
-	_curGroupPtr = NULL;
-	_curMemberPtr = NULL;
+	_curLibPtr = nullptr;
+	_curGroupPtr = nullptr;
+	_curMemberPtr = nullptr;
 	_bufferEnd = 0;
 	_bufferBegin = 0;
 	_bytesLeft = 0;
 	_bufSize = 0;
-	_bufStart = NULL;
-	_bufPos = NULL;
+	_bufStart = nullptr;
+	_bufPos = nullptr;
 	_historyIndex = 0;
 	_runLength = 0;
 	_decompState = false;
@@ -45,8 +45,8 @@ BoltFilesState::BoltFilesState(VoyeurEngine *vm) : _vm(vm) {
 	_runValue = 0;
 	_runOffset = 0;
 	Common::fill(&_historyBuffer[0], &_historyBuffer[0x200], 0);
-	_curFd = NULL;
-	_boltPageFrame = NULL;
+	_curFd = nullptr;
+	_boltPageFrame = nullptr;
 }
 
 #define NEXT_BYTE if (--_bytesLeft < 0) nextBlock()
@@ -181,7 +181,7 @@ FilesManager::~FilesManager() {
 }
 
 bool FilesManager::openBoltLib(const Common::String &filename, BoltFile *&boltFile) {
-	if (boltFile != NULL) {
+	if (boltFile != nullptr) {
 		_boltFilesState->_curLibPtr = boltFile;
 		return true;
 	}
@@ -200,7 +200,7 @@ bool FilesManager::openBoltLib(const Common::String &filename, BoltFile *&boltFi
 byte *FilesManager::fload(const Common::String &filename, int *size) {
 	Common::File f;
 	int filesize;
-	byte *data = NULL;
+	byte *data = nullptr;
 
 	if (f.open(filename)) {
 		// Read in the file
@@ -237,9 +237,9 @@ BoltFile::BoltFile(const Common::String &filename, BoltFilesState &state): _stat
 BoltFile::~BoltFile() {
 	_file.close();
 	if (_state._curFd == &_file)
-		_state._curFd = NULL;
+		_state._curFd = nullptr;
 	if (_state._curLibPtr == this)
-		_state._curLibPtr = NULL;
+		_state._curLibPtr = nullptr;
 }
 
 BoltGroup *BoltFile::getBoltGroup(uint16 id) {
@@ -297,7 +297,7 @@ BoltEntry &BoltFile::boltEntry(uint16 id) {
 
 PictureResource *BoltFile::getPictureResource(uint32 id) {
 	if ((int32)id == -1)
-		return NULL;
+		return nullptr;
 
 	if (id & 0xffff)
 		id <<= 16;
@@ -306,7 +306,7 @@ PictureResource *BoltFile::getPictureResource(uint32 id) {
 
 CMapResource *BoltFile::getCMapResource(uint32 id) {
 	if ((int32)id == -1)
-		return NULL;
+		return nullptr;
 
 	if (id & 0xffff)
 		id <<= 16;
@@ -317,7 +317,7 @@ CMapResource *BoltFile::getCMapResource(uint32 id) {
 byte *BoltFile::memberAddr(uint32 id) {
 	BoltGroup &group = _groups[id >> 8];
 	if (!group._loaded)
-		return NULL;
+		return nullptr;
 
 	// If an entry already has a processed representation, we shouldn't
 	// still be accessing the raw data
@@ -330,7 +330,7 @@ byte *BoltFile::memberAddr(uint32 id) {
 byte *BoltFile::memberAddrOffset(uint32 id) {
 	BoltGroup &group = _groups[id >> 24];
 	if (!group._loaded)
-		return NULL;
+		return nullptr;
 
 	// If an entry already has a processed representation, we shouldn't
 	// still be accessing the raw data
@@ -345,13 +345,13 @@ byte *BoltFile::memberAddrOffset(uint32 id) {
  */
 void BoltFile::resolveIt(uint32 id, byte **p) {
 	if ((int32)id == -1) {
-		*p = NULL;
+		*p = nullptr;
 	} else {
 		byte *ptr = memberAddrOffset(id);
 		if (ptr) {
 			*p = ptr;
 		} else {
-			*p = NULL;
+			*p = nullptr;
 			assert(_state._resolves.size() < 1000);
 			_state._resolves.push_back(ResolveEntry(id, p));
 		}
@@ -360,7 +360,7 @@ void BoltFile::resolveIt(uint32 id, byte **p) {
 
 void BoltFile::resolveFunction(uint32 id, ScreenMethodPtr *fn) {
 	if ((int32)id == -1)
-		*fn = NULL;
+		*fn = nullptr;
 	else
 		error("Function fnTermGro array not supported");
 }
@@ -420,7 +420,7 @@ byte *BoltFile::getBoltMember(uint32 id) {
 }
 
 void BoltFile::initDefault() {
-	_state._curMemberPtr->_data = _state.decompress(NULL, _state._curMemberPtr->_size,
+	_state._curMemberPtr->_data = _state.decompress(nullptr, _state._curMemberPtr->_size,
 		_state._curMemberPtr->_mode);
 }
 
@@ -504,7 +504,7 @@ void BVoyBoltFile::initSoundMap() {
 }
 
 void BVoyBoltFile::sInitRect() {
-	_state._curMemberPtr->_data = _state.decompress(NULL, _state._curMemberPtr->_size,
+	_state._curMemberPtr->_data = _state.decompress(nullptr, _state._curMemberPtr->_size,
 		_state._curMemberPtr->_mode);
 
 	// Check whether the resource Id is in the list of extended rects
@@ -520,7 +520,7 @@ void BVoyBoltFile::sInitRect() {
 
 void BVoyBoltFile::sInitPic() {
 	// Read in the header data
-	_state._curMemberPtr->_data = _state.decompress(NULL, 24, _state._curMemberPtr->_mode);
+	_state._curMemberPtr->_data = _state.decompress(nullptr, 24, _state._curMemberPtr->_mode);
 	_state._curMemberPtr->_picResource = new PictureResource(_state,
 		_state._curMemberPtr->_data);
 }
@@ -740,7 +740,7 @@ RectResource::RectResource(int x1, int y1, int x2, int y2) {
 /*------------------------------------------------------------------------*/
 
 DisplayResource::DisplayResource() {
-	_vm = NULL;
+	_vm = nullptr;
 	_flags = DISPFLAG_NONE;
 }
 
@@ -814,7 +814,7 @@ int DisplayResource::drawText(const Common::String &msg) {
 
 	Common::Rect *clipPtr = screen._clipPtr;
 	if (!(fontInfo._picFlags & DISPFLAG_1))
-		screen._clipPtr = NULL;
+		screen._clipPtr = nullptr;
 
 	int minChar = fontData._minChar;
 	int padding = fontData._padding;
@@ -829,7 +829,7 @@ int DisplayResource::drawText(const Common::String &msg) {
 	fontChar._select = fontInfo._picSelect;
 	fontChar._bounds.setHeight(fontHeight);
 
-	ViewPortResource *viewPort = !(_flags & DISPFLAG_VIEWPORT) ? NULL :
+	ViewPortResource *viewPort = !(_flags & DISPFLAG_VIEWPORT) ? nullptr :
 		(ViewPortResource *)this;
 
 	if ((fontInfo._fontFlags & DISPFLAG_1) || fontInfo._justify ||
@@ -971,7 +971,7 @@ int DisplayResource::drawText(const Common::String &msg) {
 
 			screen.sDrawPic(&fontChar, this, Common::Point(xp, yp));
 
-			fontChar._imgData = NULL;
+			fontChar._imgData = nullptr;
 			xp += charWidth + padding;
 			msgWidth += charWidth + padding;
 		}
@@ -1034,7 +1034,7 @@ PictureResource::PictureResource(BoltFilesState &state, const byte *src):
 	_planeSize = READ_LE_UINT16(&src[22]);
 
 	_keyColor = 0;
-	_imgData = NULL;
+	_imgData = nullptr;
 	_freeImgData = DisposeAfterUse::YES;
 
 	int nbytes = _bounds.width() * _bounds.height();
@@ -1110,9 +1110,9 @@ PictureResource::PictureResource(BoltFilesState &state, const byte *src):
 				nbytes = state._curMemberPtr->_size - 24;
 
 			int mask = (nbytes + 0x3FFF) >> 14;
-			_imgData = NULL;
+			_imgData = nullptr;
 
-			if (state._boltPageFrame != NULL) {
+			if (state._boltPageFrame != nullptr) {
 				_maskData = mask;
 				state.decompress(state._boltPageFrame, nbytes, state._curMemberPtr->_mode);
 				return;
@@ -1123,7 +1123,7 @@ PictureResource::PictureResource(BoltFilesState &state, const byte *src):
 			_imgData = new byte[nbytes];
 			Common::fill(_imgData, _imgData + nbytes, 0);
 		} else {
-			_imgData = state.decompress(NULL, nbytes, state._curMemberPtr->_mode);
+			_imgData = state.decompress(nullptr, nbytes, state._curMemberPtr->_mode);
 		}
 	}
 }
@@ -1151,7 +1151,7 @@ PictureResource::PictureResource() {
 	_planeSize = 0;
 	_keyColor = 0;
 
-	_imgData = NULL;
+	_imgData = nullptr;
 	_freeImgData = DisposeAfterUse::NO;
 }
 
@@ -1203,7 +1203,7 @@ void PictureResource::flipVertical(const byte *data) {
 ViewPortResource::ViewPortResource(BoltFilesState &state, const byte *src):
 		_state(state), DisplayResource(state._vm) {
 	_flags = READ_LE_UINT16(src);
-	_parent = NULL;
+	_parent = nullptr;
 	_pageCount = READ_LE_UINT16(src + 6);
 	_pageIndex = READ_LE_UINT16(src + 8);
 	_lastPage = READ_LE_UINT16(src + 10);
@@ -1227,7 +1227,7 @@ ViewPortResource::ViewPortResource(BoltFilesState &state, const byte *src):
 		int id = (int)READ_LE_UINT32(src + 0x34 + listIndex * 4);
 
 		if (id == -1) {
-			_rectListPtr[listIndex] = NULL;
+			_rectListPtr[listIndex] = nullptr;
 		} else {
 			_rectListPtr[listIndex] = new Common::Array<Common::Rect>();
 
@@ -1331,7 +1331,7 @@ void ViewPortResource::setupViewPort(PictureResource *page, Common::Rect *clippi
 }
 
 void ViewPortResource::setupViewPort() {
-	setupViewPort(_state._vm->_screen->_backgroundPage, NULL,
+	setupViewPort(_state._vm->_screen->_backgroundPage, nullptr,
 		&Screen::setupMCGASaveRect, &Screen::addRectOptSaveRect,
 		&Screen::restoreMCGASaveRect);
 }
@@ -1360,11 +1360,19 @@ void ViewPortResource::fillPic(byte onOff) {
 
 void ViewPortResource::drawIfaceTime() {
 	// Hour display
-	_state._vm->_screen->drawANumber(_state._vm->_screen->_vPort,
-		(_state._vm->_gameHour / 10) == 0 ? 10 : _state._vm->_gameHour / 10,
-		Common::Point(161, 25));
-	_state._vm->_screen->drawANumber(_state._vm->_screen->_vPort,
-		_state._vm->_gameHour % 10, Common::Point(172, 25));
+	if (_state._vm->_voy->_isAM || _vm->getLanguage() != Common::DE_DEU) {
+		_state._vm->_screen->drawANumber(_state._vm->_screen->_vPort,
+										 (_state._vm->_gameHour / 10) == 0 ? 10 : _state._vm->_gameHour / 10,
+										 Common::Point(161, 25));
+		_state._vm->_screen->drawANumber(_state._vm->_screen->_vPort,
+										 _state._vm->_gameHour % 10, Common::Point(172, 25));
+	} else { // DE + PM
+		_state._vm->_screen->drawANumber(_state._vm->_screen->_vPort,
+										 ((_state._vm->_gameHour + 12) / 10) == 0 ? 10 : (_state._vm->_gameHour + 12) / 10,
+										 Common::Point(161, 25));
+		_state._vm->_screen->drawANumber(_state._vm->_screen->_vPort,
+										 (_state._vm->_gameHour + 12) % 10, Common::Point(172, 25));
+	}
 
 	// Minute display
 	_state._vm->_screen->drawANumber(_state._vm->_screen->_vPort,
@@ -1457,7 +1465,7 @@ FontResource::~FontResource() {
 /*------------------------------------------------------------------------*/
 
 FontInfoResource::FontInfoResource(BoltFilesState &state, const byte *src) {
-	_curFont = NULL;
+	_curFont = nullptr;
 	_picFlags = src[4];
 	_picSelect = src[5];
 	_picPick = src[6];
@@ -1477,7 +1485,7 @@ FontInfoResource::FontInfoResource(BoltFilesState &state, const byte *src) {
 }
 
 FontInfoResource::FontInfoResource() {
-	_curFont = NULL;
+	_curFont = nullptr;
 	_picFlags = DISPFLAG_1 | DISPFLAG_2;
 	_picSelect = 0xff;
 	_picPick = 0xff;
@@ -1497,7 +1505,7 @@ FontInfoResource::FontInfoResource(byte picFlags, byte picSelect, byte picPick,
 		byte fontFlags, FontJustify justify, int fontSaveBack, const Common::Point &pos,
 		int justifyWidth, int justifyHeight, const Common::Point &shadow, int foreColor,
 		int backColor, int shadowColor) {
-	_curFont = NULL;
+	_curFont = nullptr;
 	_picFlags = picFlags;
 	_picSelect = picSelect;
 	_picPick = picPick;
diff --git a/engines/voyeur/files.h b/engines/voyeur/files.h
index cb863605040..540de9b4de1 100644
--- a/engines/voyeur/files.h
+++ b/engines/voyeur/files.h
@@ -247,7 +247,7 @@ enum DisplayFlag {
 	DISPFLAG_NONE = 0};
 
 class DisplayResource {
-private:
+protected:
 	VoyeurEngine *_vm;
 public:
 	uint32 _flags;
@@ -349,7 +349,7 @@ public:
 	virtual ~ViewPortResource();
 
 	void setupViewPort();
-	void setupViewPort(PictureResource *pic, Common::Rect *clippingRect = NULL);
+	void setupViewPort(PictureResource *pic, Common::Rect *clippingRect = nullptr);
 	void addSaveRect(int pageIndex, const Common::Rect &r);
 	void fillPic(byte onOff);
 	void drawIfaceTime();
diff --git a/engines/voyeur/screen.cpp b/engines/voyeur/screen.cpp
index 0f8e78b5d97..95201f63828 100644
--- a/engines/voyeur/screen.cpp
+++ b/engines/voyeur/screen.cpp
@@ -42,13 +42,13 @@ Screen::Screen(VoyeurEngine *vm) : Graphics::Screen(), _vm(vm), _drawPtr(&_defau
 	_SVGAMode = 0;
 	_planeSelect = 0;
 	_saveBack = true;
-	_clipPtr = NULL;
-	_viewPortListPtr = NULL;
-	_backgroundPage = NULL;
-	_vPort = NULL;
-	_fontPtr = NULL;
+	_clipPtr = nullptr;
+	_viewPortListPtr = nullptr;
+	_backgroundPage = nullptr;
+	_vPort = nullptr;
+	_fontPtr = nullptr;
 	Common::fill(&_VGAColors[0], &_VGAColors[PALETTE_SIZE], 0);
-	_fontChar = new PictureResource(DISPFLAG_NONE, 0xff, 0xff, 0, Common::Rect(), 0, NULL, 0);
+	_fontChar = new PictureResource(DISPFLAG_NONE, 0xff, 0xff, 0, Common::Rect(), 0, nullptr, 0);
 	_backColors = nullptr;
 }
 
@@ -117,7 +117,7 @@ void Screen::sDrawPic(DisplayResource *srcDisplay, DisplayResource *destDisplay,
 	int srcOffset;
 	int screenOffset;
 	int srcFlags, destFlags;
-	ViewPortResource *destViewPort = NULL;
+	ViewPortResource *destViewPort = nullptr;
 	Common::Rect newBounds;
 	Common::Rect backBounds;
 	int tmpWidth = 0;
@@ -157,7 +157,7 @@ void Screen::sDrawPic(DisplayResource *srcDisplay, DisplayResource *destDisplay,
 	srcOffset = 0;
 	srcFlags = srcPic->_flags;
 	destFlags = destPic->_flags;
-	byte *cursorData = NULL;
+	byte *cursorData = nullptr;
 
 	if (srcFlags & DISPFLAG_1) {
 		if (_clipPtr) {
@@ -1007,8 +1007,8 @@ void Screen::setColors(int start, int count, const byte *pal) {
 void Screen::screenReset() {
 	resetPalette();
 
-	_backgroundPage = NULL;
-	_vPort->setupViewPort(NULL);
+	_backgroundPage = nullptr;
+	_vPort->setupViewPort(nullptr);
 	fillPic(_vPort, 0);
 
 	_vm->flipPageAndWait();
diff --git a/engines/voyeur/staticres.cpp b/engines/voyeur/staticres.cpp
index e355b4c5669..f7df3132b39 100644
--- a/engines/voyeur/staticres.cpp
+++ b/engines/voyeur/staticres.cpp
@@ -104,16 +104,27 @@ const char *const SZ_FILENAMES[] = {
 	"Q1240100", "E1325100"
 };
 
-const char *const SATURDAY = "Saturday";
-const char *const SUNDAY = "Sunday";
-const char *const MONDAY = "Monday Morning";
-const char *const AM = "am";
-const char *const PM = "pm";
+const char *const SATURDAY_EN = "Saturday";
+const char *const SUNDAY_EN = "Sunday";
+const char *const MONDAY_EN = "Monday Morning";
+const char *const AM_EN = "am";
+const char *const PM_EN = "pm";
+const char *const START_OF_MESSAGE_EN = "*** Start of Message ***";
+const char *const END_OF_MESSAGE_EN = "*** End of Message ***";
+const char *const EVENT_TYPE_STRINGS_EN[4] = { "Video", "Audio", "Evidence", "Computer" };
+const char *const SATURDAY_AFTERNOON_EN = "Saturday Afternoon";
+const char *const PLAYER_APARTMENT_EN = "Player's Apartment";
 
-const char *const START_OF_MESSAGE = "*** Start of Message ***";
-const char *const END_OF_MESSAGE = "*** End of Message ***";
-
-const char *const EVENT_TYPE_STRINGS[4] = { "Video", "Audio", "Evidence", "Computer" };
+const char *const SATURDAY_DE = "Samstag";
+const char *const SUNDAY_DE = "Sonntag";
+const char *const MONDAY_DE = "Montag Morgen";
+const char *const AM_DE = " Uhr";
+const char *const PM_DE = " Uhr";
+const char *const START_OF_MESSAGE_DE = "   *** TEXTANFANG ***   ";
+const char *const END_OF_MESSAGE_DE = "   *** TEXTENDE ***   ";
+const char *const EVENT_TYPE_STRINGS_DE[4] = {"Video", "Audio", "Beweis", "Computer"};
+const char *const SATURDAY_AFTERNOON_DE = "Samstag Nachmittag";
+const char *const PLAYER_APARTMENT_DE = "Wohnung des Spielers";
 
 int DOT_LINE_START[9] = {
 	0xE880, 0xE9C0, 0xEB00, 0xEC40, 0xED80, 0xEEC0, 0xF000, 0xF140, 0xF280
@@ -125,7 +136,7 @@ int DOT_LINE_LENGTH[9] = {
 	5, 7, 9, 11, 11, 11, 9, 7, 5
 };
 
-const char *const PIRACY_MESSAGE[] = {
+const char *const PIRACY_MESSAGE_EN[] = {
 	"It is illegal to make",
 	"unauthorized copies of",
 	"this software. Duplication",
@@ -138,4 +149,17 @@ const char *const PIRACY_MESSAGE[] = {
 	"5 years."
 };
 
+const char *const PIRACY_MESSAGE_DE[] = {
+	"VOYEUR",
+	"A POV Entert. Group Production",
+	"Copyright 1993, 1994",
+	"Philips Interactive Media",
+	"Alle Urheberrechte und",
+	"Leistungsschutzrechte",
+	"vorbehalten. Kein Verleih.",
+	"Keine unerlaubte Vervielfaeltigung,",
+	"Vermietung, Auffuehrung",
+	"oder Sendung."
+};
+
 } // End of namespace Voyeur
diff --git a/engines/voyeur/staticres.h b/engines/voyeur/staticres.h
index 25db738a938..60bb12ed9d5 100644
--- a/engines/voyeur/staticres.h
+++ b/engines/voyeur/staticres.h
@@ -40,22 +40,34 @@ extern const int COMPUTER_SCREEN_TABLE[];
 
 extern const char *const SZ_FILENAMES[];
 
-extern const char *const SATURDAY;
-extern const char *const SUNDAY;
-extern const char *const MONDAY;
-extern const char *const AM;
-extern const char *const PM;
-
-extern const char *const START_OF_MESSAGE;
-extern const char *const END_OF_MESSAGE;
-
-extern const char *const EVENT_TYPE_STRINGS[4];
+extern const char *const SATURDAY_EN;
+extern const char *const SUNDAY_EN;
+extern const char *const MONDAY_EN;
+extern const char *const AM_EN;
+extern const char *const PM_EN;
+extern const char *const START_OF_MESSAGE_EN;
+extern const char *const END_OF_MESSAGE_EN;
+extern const char *const EVENT_TYPE_STRINGS_EN[4];
+extern const char *const SATURDAY_AFTERNOON_EN;
+extern const char *const PLAYER_APARTMENT_EN;
+
+extern const char *const SATURDAY_DE;
+extern const char *const SUNDAY_DE;
+extern const char *const MONDAY_DE;
+extern const char *const AM_DE;
+extern const char *const PM_DE;
+extern const char *const START_OF_MESSAGE_DE;
+extern const char *const END_OF_MESSAGE_DE;
+extern const char *const EVENT_TYPE_STRINGS_DE[4];
+extern const char *const SATURDAY_AFTERNOON_DE;
+extern const char *const PLAYER_APARTMENT_DE;
 
 extern int DOT_LINE_START[9];
 extern int DOT_LINE_OFFSET[9];
 extern int DOT_LINE_LENGTH[9];
 
-extern const char *const PIRACY_MESSAGE[];
+extern const char *const PIRACY_MESSAGE_EN[];
+extern const char *const PIRACY_MESSAGE_DE[];
 
 } // End of namespace Voyeur
 
diff --git a/engines/voyeur/voyeur.cpp b/engines/voyeur/voyeur.cpp
index 17d8a05472b..a0085576272 100644
--- a/engines/voyeur/voyeur.cpp
+++ b/engines/voyeur/voyeur.cpp
@@ -42,13 +42,13 @@ VoyeurEngine::VoyeurEngine(OSystem *syst, const VoyeurGameDescription *gameDesc)
 	_screen = nullptr;
 	_soundManager = nullptr;
 	_voy = nullptr;
-	_bVoy = NULL;
+	_bVoy = nullptr;
 
 	_iForceDeath = ConfMan.getInt("boot_param");
 	if (_iForceDeath < 1 || _iForceDeath > 4)
 		_iForceDeath = -1;
 
-	_controlPtr = NULL;
+	_controlPtr = nullptr;
 	_stampFlags = 0;
 	_playStampGroupId = _currentVocId = 0;
 	_audioVideoId = -1;
@@ -155,8 +155,6 @@ void VoyeurEngine::initInput() {
 }
 
 bool VoyeurEngine::doHeadTitle() {
-//	char dest[144];
-
 	_eventsManager->startMainClockInt();
 
 	if (_loadGameSlot == -1) {
@@ -191,7 +189,11 @@ bool VoyeurEngine::doHeadTitle() {
 			return false;
 
 		_eventsManager->getMouseInfo();
-		doTransitionCard("Saturday Afternoon", "Player's Apartment");
+		if (getLanguage() == Common::DE_DEU)
+			doTransitionCard(SATURDAY_AFTERNOON_DE, PLAYER_APARTMENT_DE);
+		else
+			doTransitionCard(SATURDAY_AFTERNOON_EN, PLAYER_APARTMENT_EN);
+
 		_eventsManager->delayClick(90);
 
 		if (_voy->_eventFlags & EVTFLAG_VICTIM_PRESET) {
@@ -557,7 +559,7 @@ void VoyeurEngine::playAVideoDuration(int videoId, int duration) {
 	if (videoId == -1)
 		return;
 
-	PictureResource *pic = NULL;
+	PictureResource *pic = nullptr;
 	if (videoId == 42) {
 		_bVoy->getBoltGroup(0xE00);
 		_eventsManager->_videoDead = 0;
@@ -637,7 +639,7 @@ void VoyeurEngine::playAudio(int audioId) {
 	_soundManager->stopVOCPlay();
 
 	_bVoy->freeBoltGroup(0x7F00);
-	_screen->_vPort->setupViewPort(NULL);
+	_screen->_vPort->setupViewPort(nullptr);
 
 	_voy->_eventFlags &= ~EVTFLAG_RECORDING;
 	_voy->_playStampMode = 129;
@@ -648,7 +650,7 @@ void VoyeurEngine::doTransitionCard(const Common::String &time, const Common::St
 	_screen->setColor(224, 220, 220, 220);
 	_eventsManager->_intPtr._hasPalette = true;
 
-	_screen->_vPort->setupViewPort(NULL);
+	_screen->_vPort->setupViewPort(nullptr);
 	_screen->_vPort->fillPic(0x80);
 	_screen->flipPage();
 	_eventsManager->sWaitFlip();
@@ -778,7 +780,7 @@ void VoyeurEngine::loadGame(int slot) {
 	if (!saveFile)
 		return;
 
-	Common::Serializer serializer(saveFile, NULL);
+	Common::Serializer serializer(saveFile, nullptr);
 
 	// Store the current time index before the game is loaded
 	_checkTransitionId = _voy->_transitionId;
@@ -817,7 +819,7 @@ Common::Error VoyeurEngine::saveGameState(int slot, const Common::String &desc,
 	header.write(saveFile, this, desc);
 
 	// Set up a serializer
-	Common::Serializer serializer(NULL, saveFile);
+	Common::Serializer serializer(nullptr, saveFile);
 
 	// Synchronise the data
 	serializer.setVersion(VOYEUR_SAVEGAME_VERSION);
diff --git a/engines/voyeur/voyeur_game.cpp b/engines/voyeur/voyeur_game.cpp
index e6ef0a5910c..2e8002688e9 100644
--- a/engines/voyeur/voyeur_game.cpp
+++ b/engines/voyeur/voyeur_game.cpp
@@ -26,7 +26,7 @@
 namespace Voyeur {
 
 void VoyeurEngine::playStamp() {
-	_stampLibPtr = NULL;
+	_stampLibPtr = nullptr;
 	_filesManager->openBoltLib("stampblt.blt", _stampLibPtr);
 
 	_stampLibPtr->getBoltGroup(0);
@@ -234,7 +234,7 @@ void VoyeurEngine::closeStamp() {
 }
 
 void VoyeurEngine::doTailTitle() {
-	_screen->_vPort->setupViewPort(NULL);
+	_screen->_vPort->setupViewPort(nullptr);
 	_screen->screenReset();
 
 	if (_bVoy->getBoltGroup(0x600)) {
@@ -287,7 +287,7 @@ void VoyeurEngine::doClosingCredits() {
 	const char *msg = (const char *)_bVoy->memberAddr(0x404);
 	const byte *creditList = (const byte *)_bVoy->memberAddr(0x405);
 
-	_screen->_vPort->setupViewPort(NULL);
+	_screen->_vPort->setupViewPort(nullptr);
 	_screen->setColor(1, 180, 180, 180);
 	_screen->setColor(2, 200, 200, 200);
 	_eventsManager->_intPtr._hasPalette = true;
@@ -394,7 +394,7 @@ void VoyeurEngine::doPiracy() {
 	_screen->setColor(1, 0, 0, 0);
 	_screen->setColor(2, 255, 255, 255);
 	_eventsManager->_intPtr._hasPalette = true;
-	_screen->_vPort->setupViewPort(NULL);
+	_screen->_vPort->setupViewPort(nullptr);
 	_screen->_vPort->fillPic(1);
 
 	FontInfoResource &fi = *_screen->_fontPtr;
@@ -410,7 +410,7 @@ void VoyeurEngine::doPiracy() {
 	// Loop through the piracy message array to draw each line
 	for (int idx = 0, yp = 33; idx < 10; ++idx) {
 		fi._pos = Common::Point(0, yp);
-		_screen->_vPort->drawText(PIRACY_MESSAGE[idx]);
+		_screen->_vPort->drawText(getLanguage() == Common::DE_DEU ? PIRACY_MESSAGE_DE[idx] : PIRACY_MESSAGE_EN[idx]);
 
 		yp += fi._curFont->_fontHeight + 4;
 	}
@@ -657,7 +657,7 @@ void VoyeurEngine::reviewTape() {
 		newY = _eventsManager->getMousePos().y;
 		_voy->_fadingType = 0;
 		_voy->_viewBounds = nullptr;
-		_screen->_vPort->setupViewPort(NULL);
+		_screen->_vPort->setupViewPort(nullptr);
 
 		if (_currentVocId != -1) {
 			_voy->_vocSecondsOffset = _voy->_RTVNum - _voy->_musicStartTime;
@@ -1087,7 +1087,7 @@ void VoyeurEngine::initIFace() {
 
 void VoyeurEngine::doScroll(const Common::Point &pt) {
 	Common::Rect clipRect(72, 47, 72 + 240, 47 + 148);
-	_screen->_vPort->setupViewPort(NULL, &clipRect);
+	_screen->_vPort->setupViewPort(nullptr, &clipRect);
 
 	int base = 0;
 	switch (_voy->_transitionId) {
@@ -1122,7 +1122,7 @@ void VoyeurEngine::doScroll(const Common::Point &pt) {
 		_screen->sDrawPic(pic, _screen->_vPort, Common::Point(784 - pt.x - 712, 150 - pt.y + 136));
 	}
 
-	_screen->_vPort->setupViewPort(NULL);
+	_screen->_vPort->setupViewPort(nullptr);
 }
 
 void VoyeurEngine::checkTransition() {
@@ -1157,11 +1157,11 @@ Common::String VoyeurEngine::getDayName() {
 	case 2:
 	case 3:
 	case 4:
-		return SATURDAY;
+		return (getLanguage() == Common::DE_DEU) ? SATURDAY_DE : SATURDAY_EN;
 	case 17:
-		return MONDAY;
+		return (getLanguage() == Common::DE_DEU) ? MONDAY_DE : MONDAY_EN;
 	default:
-		return SUNDAY;
+		return (getLanguage() == Common::DE_DEU) ? SUNDAY_DE : SUNDAY_EN;
 	}
 }
 
@@ -1169,7 +1169,10 @@ Common::String VoyeurEngine::getTimeOfDay() {
 	if (_voy->_transitionId == 17)
 		return "";
 
-	return Common::String::format("%d:%02d%s", _gameHour, _gameMinute, _voy->_isAM ? AM : PM);
+	if (getLanguage() == Common::DE_DEU)
+		return Common::String::format("%d:%02d%s", _voy->_isAM ? _gameHour : _gameHour + 12, _gameMinute, _voy->_isAM ? AM_DE : PM_DE);
+
+	return Common::String::format("%d:%02d%s", _gameHour, _gameMinute, _voy->_isAM ? AM_EN : PM_EN);
 }
 
 int VoyeurEngine::doComputerText(int maxLen) {
@@ -1190,7 +1193,7 @@ int VoyeurEngine::doComputerText(int maxLen) {
 		font._justifyWidth = 384;
 		font._justifyHeight = 100;
 		font._pos = Common::Point(128, 100);
-		_screen->_vPort->drawText(END_OF_MESSAGE);
+		_screen->_vPort->drawText(getLanguage() == Common::DE_DEU ? END_OF_MESSAGE_DE : END_OF_MESSAGE_EN);
 	} else if (_voy->_RTVNum < _voy->_computerTimeMin && maxLen == 9999) {
 		if (_currentVocId != -1)
 			_soundManager->startVOCPlay(_currentVocId);
@@ -1198,7 +1201,7 @@ int VoyeurEngine::doComputerText(int maxLen) {
 		font._justifyWidth = 384;
 		font._justifyHeight = 100;
 		font._pos = Common::Point(120, 100);
-		_screen->_vPort->drawText(START_OF_MESSAGE);
+		_screen->_vPort->drawText(getLanguage() == Common::DE_DEU ? START_OF_MESSAGE_DE : START_OF_MESSAGE_EN);
 	} else {
 		char *msg = (char *)_bVoy->memberAddr(0x4900 + _voy->_computerTextId);
 		font._pos = Common::Point(96, 60);
@@ -1223,7 +1226,7 @@ int VoyeurEngine::doComputerText(int maxLen) {
 					_screen->_fontPtr->_justifyWidth = 384;
 					_screen->_fontPtr->_justifyHeight = 100;
 					_screen->_fontPtr->_pos = Common::Point(128, 100);
-					_screen->_vPort->drawText(END_OF_MESSAGE);
+					_screen->_vPort->drawText(getLanguage() == Common::DE_DEU ? END_OF_MESSAGE_DE : END_OF_MESSAGE_EN);
 				}
 				break;
 			}


Commit: 42871c7cdbfe7bb4ee5af0403b16f4d064c32b31
    https://github.com/scummvm/scummvm/commit/42871c7cdbfe7bb4ee5af0403b16f4d064c32b31
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2023-03-15T20:39:53-07:00

Commit Message:
VOYEUR: Change German MD5 based on an email forwarded by Sev

Changed paths:
    engines/voyeur/detection_tables.h


diff --git a/engines/voyeur/detection_tables.h b/engines/voyeur/detection_tables.h
index bfa62047538..08b937c6224 100644
--- a/engines/voyeur/detection_tables.h
+++ b/engines/voyeur/detection_tables.h
@@ -52,7 +52,7 @@ static const VoyeurGameDescription gameDescriptions[] = {
 	 {
 		 "voyeur",
 		 "German Fan Made Version",
-		 AD_ENTRY1s("bvoy.blt", "12e9e10654171501cf8be3a7aa7198e1", 13036269),
+		 AD_ENTRY1s("bvoy.blt", "d25054313a4e676bf7a080bd36f91608", 13036269),
 		 Common::DE_DEU,
 		 Common::kPlatformDOS,
 		 ADGF_NO_FLAGS,


Commit: bdb32bfc912abbb3ac65dda635f4a15026048154
    https://github.com/scummvm/scummvm/commit/bdb32bfc912abbb3ac65dda635f4a15026048154
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2023-03-15T20:39:53-07:00

Commit Message:
VOYEUR: Fix detection

Changed paths:
    engines/voyeur/detection_tables.h


diff --git a/engines/voyeur/detection_tables.h b/engines/voyeur/detection_tables.h
index 08b937c6224..993ed4340ef 100644
--- a/engines/voyeur/detection_tables.h
+++ b/engines/voyeur/detection_tables.h
@@ -52,7 +52,7 @@ static const VoyeurGameDescription gameDescriptions[] = {
 	 {
 		 "voyeur",
 		 "German Fan Made Version",
-		 AD_ENTRY1s("bvoy.blt", "d25054313a4e676bf7a080bd36f91608", 13036269),
+		 AD_ENTRY1s("bvoy.blt", "af281a228ddcf7daa18a3c8b591bace9", 15134654),
 		 Common::DE_DEU,
 		 Common::kPlatformDOS,
 		 ADGF_NO_FLAGS,


Commit: 5a7bfc3954d85f096db2f385fe4494b642fe1446
    https://github.com/scummvm/scummvm/commit/5a7bfc3954d85f096db2f385fe4494b642fe1446
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2023-03-15T20:39:53-07:00

Commit Message:
VOYEUR: Fix occasional issue in hour display

Changed paths:
    engines/voyeur/files_threads.cpp


diff --git a/engines/voyeur/files_threads.cpp b/engines/voyeur/files_threads.cpp
index 854a358c1fd..9ad98489ad0 100644
--- a/engines/voyeur/files_threads.cpp
+++ b/engines/voyeur/files_threads.cpp
@@ -1297,9 +1297,6 @@ void ThreadResource::doRoom() {
 }
 
 int ThreadResource::doInterface() {
-	PictureResource *pic;
-	Common::Point pt;
-
 	_vm->_voy->_eventFlags |= EVTFLAG_TIME_DISABLED;
 	if (_vm->_voy->_abortInterface) {
 		_vm->_voy->_abortInterface = false;
@@ -1382,7 +1379,7 @@ int ThreadResource::doInterface() {
 		}
 
 		// Calculate the mouse position within the entire mansion
-		pt = _vm->_eventsManager->getMousePos();
+		Common::Point pt = _vm->_eventsManager->getMousePos();
 		if (!mansionViewBounds.contains(pt))
 			pt = Common::Point(-1, -1);
 		else
@@ -1430,13 +1427,19 @@ int ThreadResource::doInterface() {
 				_vm->_gameMinute % 10, Common::Point(201, 25));
 
 			if (_vm->_voy->_RTANum & 4) {
-				int v = _vm->_gameHour / 10;
-				_vm->_screen->drawANumber(_vm->_screen->_vPort,
-					v == 0 ? 10 : v, Common::Point(161, 25));
-				_vm->_screen->drawANumber(_vm->_screen->_vPort,
-					_vm->_gameHour % 10, Common::Point(172, 25));
+				int v1, v2;
+				if (!_vm->_voy->_isAM && _vm->getLanguage() == Common::DE_DEU) {
+					v1 = (_vm->_gameHour + 12) / 10;
+					v2 = (_vm->_gameHour + 12) % 10;
+				} else {
+					v1 = _vm->_gameHour / 10;
+					v2 = _vm->_gameHour % 10;
+				}
+				
+				_vm->_screen->drawANumber(_vm->_screen->_vPort, v1 == 0 ? 10 : v1, Common::Point(161, 25));
+				_vm->_screen->drawANumber(_vm->_screen->_vPort, v2, Common::Point(172, 25));
 
-				pic = _vm->_bVoy->boltEntry(_vm->_voy->_isAM ? 272 : 273)._picResource;
+				PictureResource *pic = _vm->_bVoy->boltEntry(_vm->_voy->_isAM ? 272 : 273)._picResource;
 				_vm->_screen->sDrawPic(pic, _vm->_screen->_vPort,
 					Common::Point(215, 27));
 			}




More information about the Scummvm-git-logs mailing list