[Scummvm-git-logs] scummvm master -> fde5042601becd50a3aaa4db92faad97cacaa26f

peres peres at scummvm.org
Thu Jul 1 10:06:07 UTC 2021


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:
fde5042601 PARALLACTION: implement BRA ferrcycle operator.


Commit: fde5042601becd50a3aaa4db92faad97cacaa26f
    https://github.com/scummvm/scummvm/commit/fde5042601becd50a3aaa4db92faad97cacaa26f
Author: peres (peres at scummvm.org)
Date: 2021-07-01T19:00:26+09:00

Commit Message:
PARALLACTION: implement BRA ferrcycle operator.

The operator does a palette manipulation to simulate the movement
of trees and railroad in part 3.

Changed paths:
    engines/parallaction/callables_br.cpp
    engines/parallaction/parallaction.h


diff --git a/engines/parallaction/callables_br.cpp b/engines/parallaction/callables_br.cpp
index ca60b8e578..e09f7f49f2 100644
--- a/engines/parallaction/callables_br.cpp
+++ b/engines/parallaction/callables_br.cpp
@@ -38,8 +38,41 @@ void Parallaction_br::_c_resetpalette(void *) {
 	warning("Parallaction_br::_c_resetpalette() not yet implemented");
 }
 
+/*
+	Used in part 3 by location ULTIMAVAG to
+	simulate the movement of trees and railroad.
+*/
 void Parallaction_br::_c_ferrcycle(void *) {
-	warning("Parallaction_br::_c_ferrcycle() not yet implemented");
+	Palette pal = _gfx->_palette;
+
+	if (_ferrcycleMode == 1) {
+		for (int i = 0; i < 16; ++i) {
+			pal.setEntry(4 * i + 192, 0, 0, 0);
+			pal.setEntry(4 * i + 193, 30, 12, 12);
+			pal.setEntry(4 * i + 194, 28, 47, 54);
+			pal.setEntry(4 * i + 195, 63, 63, 63);
+		}
+	} else if (_ferrcycleMode == 2) {
+		for (int i = 0; i < 4; ++i) {
+			for (int j = 0; j < 4; ++j) {
+				pal.setEntry(j + 16 * i + 192, 0, 0, 0);
+				pal.setEntry(j + 16 * i + 196, 30, 12, 12);
+				pal.setEntry(j + 16 * i + 200, 28, 47, 54);
+				pal.setEntry(j + 16 * i + 204, 63, 63, 63);
+			}
+		}
+	} else if (_ferrcycleMode == 0) {
+		for (int i = 0; i < 16; ++i) {
+			pal.setEntry(i + 192, 0, 0, 0);
+			pal.setEntry(i + 208, 30, 12, 12);
+			pal.setEntry(i + 224, 28, 47, 54);
+			pal.setEntry(i + 240, 63, 63, 63);
+		}
+	}
+
+	_gfx->setPalette(pal);
+
+	_ferrcycleMode = (_ferrcycleMode + 1) % 3;
 }
 
 void Parallaction_br::_c_lipsinc(void *) {
diff --git a/engines/parallaction/parallaction.h b/engines/parallaction/parallaction.h
index f0c134ce89..bafdfae307 100644
--- a/engines/parallaction/parallaction.h
+++ b/engines/parallaction/parallaction.h
@@ -578,6 +578,7 @@ private:
 	Common::String		_followerName;
 	AnimationPtr		_follower;
 	PathWalker_BR		*_walker;
+	int					_ferrcycleMode;
 
 	// dos callables
 	void _c_null(void *);




More information about the Scummvm-git-logs mailing list