[Scummvm-git-logs] scummvm master -> 765ec887a0068676294de75644a815727fa58082

dreammaster dreammaster at scummvm.org
Mon Mar 27 03:05:30 CEST 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
765ec887a0 TITANIC: Fix loading of CStarView class


Commit: 765ec887a0068676294de75644a815727fa58082
    https://github.com/scummvm/scummvm/commit/765ec887a0068676294de75644a815727fa58082
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-03-26T21:05:21-04:00

Commit Message:
TITANIC: Fix loading of CStarView class

Changed paths:
    engines/titanic/star_control/star_view.cpp
    engines/titanic/star_control/star_view.h


diff --git a/engines/titanic/star_control/star_view.cpp b/engines/titanic/star_control/star_view.cpp
index a9b6cde..92a722d 100644
--- a/engines/titanic/star_control/star_view.cpp
+++ b/engines/titanic/star_control/star_view.cpp
@@ -31,7 +31,7 @@
 namespace Titanic {
 
 CStarView::CStarView() : _sub12((const CStar20Data *)nullptr), _owner(nullptr),
-		_starField(nullptr), _videoSurface(nullptr), _field118(0),
+		_starField(nullptr), _videoSurface(nullptr), _hasReference(0),
 		_videoSurface2(nullptr), _homePhotoMask(nullptr),
 		_field218(false), _showingPhoto(false) {
 	CStar20Data data = { 0, 0, 100000.0, 0, 20.0, 1.0, 1.0, 1.0 };
@@ -43,8 +43,8 @@ void CStarView::load(SimpleFile *file, int param) {
 	if (!param) {
 		_sub12.load(file, param);
 
-		_field118 = file->readNumber();
-		if (_field118)
+		_hasReference = file->readNumber();
+		if (_hasReference)
 			_sub13.load(file, 0);
 
 		_field218 = file->readNumber();
@@ -55,8 +55,8 @@ void CStarView::load(SimpleFile *file, int param) {
 void CStarView::save(SimpleFile *file, int indent) {
 	_sub12.save(file, indent);
 
-	file->writeNumberLine(_field118, indent);
-	if (_field118)
+	file->writeNumberLine(_hasReference, indent);
+	if (_hasReference)
 		_sub13.save(file, indent);
 
 	file->writeNumberLine(_field218, indent);
@@ -69,7 +69,7 @@ void CStarView::setup(CScreenManager *screenManager, CStarField *starField, CSta
 }
 
 void CStarView::reset() {
-	if (!_field118) {
+	if (_hasReference) {
 		CStarControlSub12 sub12(&_sub13);
 		fn18(&sub12);
 	}
@@ -369,7 +369,7 @@ void CStarView::setHasReference() {
 	_field218 = false;
 	_sub13.fn13(MODE_PHOTO, 0.0);
 	_sub13.fn13(MODE_STARFIELD, 0.0);
-	_field118 = true;
+	_hasReference = true;
 	reset();
 	_field218 = true;
 }
diff --git a/engines/titanic/star_control/star_view.h b/engines/titanic/star_control/star_view.h
index 9a9e069..1262f3c 100644
--- a/engines/titanic/star_control/star_view.h
+++ b/engines/titanic/star_control/star_view.h
@@ -42,16 +42,13 @@ private:
 	CStarField *_starField;
 	CVideoSurface *_videoSurface;
 	CStarControlSub12 _sub12;
-	int _field118;
+	bool _hasReference;
 	CStarControlSub13 _sub13;
 	CSurfaceFader _fader;
 	CVideoSurface *_videoSurface2;
 	CGameObject *_homePhotoMask;
 	bool _field218;
 	bool _showingPhoto;
-#if 0
-	int _field210;
-#endif
 private:
 	bool fn1();
 	void fn18(CStarControlSub12 *sub12);





More information about the Scummvm-git-logs mailing list