[Scummvm-git-logs] scummvm master -> 84c7b3acaa9084ee6774640f7f3ef23e74d9ae28

sev- noreply at scummvm.org
Tue Jun 28 20:11:19 UTC 2022


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:
84c7b3acaa DIRECTOR: LINGO: Implement kTheRegPoint STUBs om BitmapCastMember::getField() and setField()


Commit: 84c7b3acaa9084ee6774640f7f3ef23e74d9ae28
    https://github.com/scummvm/scummvm/commit/84c7b3acaa9084ee6774640f7f3ef23e74d9ae28
Author: Pragyansh Chaturvedi (r41k0u) (pragyanshchaturvedi18 at gmail.com)
Date: 2022-06-28T22:11:16+02:00

Commit Message:
DIRECTOR: LINGO: Implement kTheRegPoint STUBs om BitmapCastMember::getField() and setField()

Changed paths:
    engines/director/lingo/lingo-object.cpp


diff --git a/engines/director/lingo/lingo-object.cpp b/engines/director/lingo/lingo-object.cpp
index a7c50eca05f..586a9a87f30 100644
--- a/engines/director/lingo/lingo-object.cpp
+++ b/engines/director/lingo/lingo-object.cpp
@@ -902,7 +902,10 @@ Datum BitmapCastMember::getField(int field) {
 		d.u.i = _bitsPerPixel;
 		break;
 	case kTheRegPoint:
-		warning("STUB: BitmapCastMember::getField(): Unprocessed getting field \"%s\" of cast %d", g_lingo->field2str(field), _castId);
+		d.type = POINT;
+		d.u.farr = new FArray;
+		d.u.farr->arr.push_back(_regX);
+		d.u.farr->arr.push_back(_regY);
 		break;
 	case kThePalette:
 		d = _clut;
@@ -923,8 +926,21 @@ bool BitmapCastMember::setField(int field, const Datum &d) {
 		warning("BitmapCastMember::setField(): Attempt to set read-only field %s of cast %d", g_lingo->field2str(field), _castId);
 		return false;
 	case kTheRegPoint:
-		warning("STUB: BitmapCastMember::setField(): Unprocessed setting field \"%s\" of cast %d", g_lingo->field2str(field), _castId);
-		return false;
+		if (d.type == POINT || (d.type == ARRAY && d.u.farr->arr.size() >= 2)) {
+			auto temp = _img;
+			_modified = true;
+			Score *score = g_director->getCurrentMovie()->getScore();
+			score->renderSprites(score->getCurrentFrame(), kRenderForceUpdate);
+			_img = nullptr;
+			_regX = d.u.farr->arr[0].asInt();
+			_regY = d.u.farr->arr[1].asInt();
+			_img = temp;
+			_modified = true;
+		} else {
+			warning("BitmapCastMember::setField(): Wrong Datum type %d for kTheRegPoint", d.type);
+			return false;
+		}
+		return true;
 	case kThePalette:
 		_clut = d.asInt();
 		return true;




More information about the Scummvm-git-logs mailing list