[Scummvm-cvs-logs] scummvm master -> 6ff53ea018b5bb56235c4331e016d43801699886

bluegr bluegr at gmail.com
Mon Jul 27 15:54:48 CEST 2015


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:
089a79de85 ACCESS: Remove leading underscore from non-class member variable
7915b91720 ACCESS: Remove unused class member variable (CID 1312757)
37be3cbe83 ACCESS: Rename ICON_DATA -> ICON_PALETTE
6ff53ea018 ACCESS: Some variable renaming


Commit: 089a79de85f30eeb78d1ae5ed8e19033e3ed50d8
    https://github.com/scummvm/scummvm/commit/089a79de85f30eeb78d1ae5ed8e19033e3ed50d8
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-07-27T14:51:17+03:00

Commit Message:
ACCESS: Remove leading underscore from non-class member variable

Changed paths:
    engines/access/player.cpp



diff --git a/engines/access/player.cpp b/engines/access/player.cpp
index ead2402..0162491 100644
--- a/engines/access/player.cpp
+++ b/engines/access/player.cpp
@@ -138,11 +138,11 @@ void Player::load() {
 }
 
 void Player::loadTexPalette() {
-	Resource *_texPal = _vm->_files->loadFile("TEXPAL.COL");
-	int size = _texPal->_size;
+	Resource *texPal = _vm->_files->loadFile("TEXPAL.COL");
+	int size = texPal->_size;
 	assert(size == 768);
 	_manPal1 = new byte[size];
-	memcpy(_manPal1, _texPal->data(), size);	
+	memcpy(_manPal1, texPal->data(), size);	
 }
 
 void Player::loadSprites(const Common::String &name) {


Commit: 7915b91720c6c9c1ac2c2c186db9418f6a6cb0a2
    https://github.com/scummvm/scummvm/commit/7915b91720c6c9c1ac2c2c186db9418f6a6cb0a2
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-07-27T14:51:51+03:00

Commit Message:
ACCESS: Remove unused class member variable (CID 1312757)

Changed paths:
    engines/access/martian/martian_player.h



diff --git a/engines/access/martian/martian_player.h b/engines/access/martian/martian_player.h
index 63a21a1..007a32e 100644
--- a/engines/access/martian/martian_player.h
+++ b/engines/access/martian/martian_player.h
@@ -37,7 +37,6 @@ private:
 	MartianEngine *_game;
 public:
 	MartianPlayer(AccessEngine *vm);
-	Resource *_texPal;
 	virtual void load();
 };
 


Commit: 37be3cbe83cdb7f4510db298c718c6b5d80ba0fe
    https://github.com/scummvm/scummvm/commit/37be3cbe83cdb7f4510db298c718c6b5d80ba0fe
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-07-27T14:52:23+03:00

Commit Message:
ACCESS: Rename ICON_DATA -> ICON_PALETTE

Changed paths:
    engines/access/martian/martian_resources.cpp
    engines/access/martian/martian_resources.h
    engines/access/screen.cpp



diff --git a/engines/access/martian/martian_resources.cpp b/engines/access/martian/martian_resources.cpp
index c7f9054..474ec2f 100644
--- a/engines/access/martian/martian_resources.cpp
+++ b/engines/access/martian/martian_resources.cpp
@@ -738,7 +738,7 @@ const byte CREDIT_DATA[] = {
 	0x0B, 0x00, 0xFF, 0xFF, 0xF4, 0x01, 0xFF, 0xFF, 0xFF, 0xFF
 };
 
-const byte ICON_DATA[] = {
+const byte ICON_PALETTE[] = {
 	0x3F, 0x3F, 0x00, 0x00, 0x07, 0x16,
 	0x00, 0x0A, 0x1A, 0x00, 0x0D, 0x1F,
 	0x00, 0x11, 0x28, 0x00, 0x15, 0x30,
diff --git a/engines/access/martian/martian_resources.h b/engines/access/martian/martian_resources.h
index de195c4..2eb810a 100644
--- a/engines/access/martian/martian_resources.h
+++ b/engines/access/martian/martian_resources.h
@@ -55,7 +55,7 @@ extern const int SIDEOFFU[];
 extern const int SIDEOFFD[];
 
 extern const byte CREDIT_DATA[];
-extern const byte ICON_DATA[];
+extern const byte ICON_PALETTE[];
 
 extern const int RMOUSE[10][2];
 
diff --git a/engines/access/screen.cpp b/engines/access/screen.cpp
index 2d9a074..41f6194 100644
--- a/engines/access/screen.cpp
+++ b/engines/access/screen.cpp
@@ -122,7 +122,7 @@ void Screen::setManPalette() {
 void Screen::setIconPalette() {
 	if (_vm->getGameID() == GType_MartianMemorandum) {
 		for (int i = 0; i < 0x1B; i++) {
-			_rawPalette[741 + i] = VGA_COLOR_TRANS(Martian::ICON_DATA[i]);
+			_rawPalette[741 + i] = VGA_COLOR_TRANS(Martian::ICON_PALETTE[i]);
 		}
 	}
 }


Commit: 6ff53ea018b5bb56235c4331e016d43801699886
    https://github.com/scummvm/scummvm/commit/6ff53ea018b5bb56235c4331e016d43801699886
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2015-07-27T14:54:23+03:00

Commit Message:
ACCESS: Some variable renaming

Changed paths:
    engines/access/bubble_box.cpp
    engines/access/bubble_box.h



diff --git a/engines/access/bubble_box.cpp b/engines/access/bubble_box.cpp
index 8227780..df8adc1 100644
--- a/engines/access/bubble_box.cpp
+++ b/engines/access/bubble_box.cpp
@@ -35,7 +35,7 @@ BubbleBox::BubbleBox(AccessEngine *vm, Access::BoxType type, int x, int y, int w
 	_btnId2 = val3;
 	_btnX2 = val4;
 	_btnId3 = _btnX3 = 0; // Unused in MM and Amazon?
-	boxStartX = boxStartY = 0;
+	_boxStartX = _boxStartY = 0;
 	_bIconStartX = _bIconStartY = 0;
 	_boxEndX = _boxEndY = 0;
 	_boxPStartX = _boxPStartY = 0;
@@ -99,7 +99,7 @@ void BubbleBox::calcBubble(const Common::String &msg) {
 	Common::Point printStart = _vm->_screen->_printStart;
 
 	// Figure out maximum width allowed
-	if (_type == TYPE_4) {
+	if (_type == kBoxTypeFileDialog) {
 		_vm->_fonts._printMaxX = 110;
 	} else {
 		_vm->_fonts._printMaxX = _vm->_fonts._font2.stringWidth(_bubbleDisplStr);
@@ -121,7 +121,7 @@ void BubbleBox::calcBubble(const Common::String &msg) {
 		_vm->_screen->_printOrg.x = _vm->_screen->_printStart.x;
 	} while (!lastLine);
 
-	if (_type == TYPE_4)
+	if (_type == kBoxTypeFileDialog)
 		++_vm->_screen->_printOrg.y += 6;
 
 	// Determine the width for the area
@@ -132,12 +132,12 @@ void BubbleBox::calcBubble(const Common::String &msg) {
 
 	// Determine the height for area
 	int y = _vm->_screen->_printOrg.y + 6;
-	if (_type == TYPE_4)
+	if (_type == kBoxTypeFileDialog)
 		y += 6;
 	int height = y - bounds.top;
 	bounds.setHeight(height);
 
-	height -= (_type == TYPE_4) ? 30 : 24;
+	height -= (_type == kBoxTypeFileDialog) ? 30 : 24;
 	if (height >= 0)
 		bounds.setHeight(bounds.height() + 13 - (height % 13));
 
@@ -198,7 +198,7 @@ void BubbleBox::printBubble_v2(const Common::String &msg) {
 		font2._fontColors[3] = 29;
 
 		int xp = _vm->_screen->_printOrg.x;
-		if (_type == TYPE_4)
+		if (_type == kBoxTypeFileDialog)
 			xp = (_bounds.width() - width) / 2 + _bounds.left - 4;
 
 		// Draw the text
@@ -240,7 +240,7 @@ void BubbleBox::doBox(int item, int box) {
 	fonts._charSet._lo = 1;
 	fonts._charSet._hi = 0;
 
-	if (_type == TYPE_4) {
+	if (_type == kBoxTypeFileDialog) {
 		fonts._charFor._lo = 0xFF;
 		error("TODO: filename listing");
 		return;
@@ -258,7 +258,7 @@ void BubbleBox::doBox(int item, int box) {
 	_vm->_screen->_orgY2 = _bounds.bottom;
 	_vm->_screen->_lColor = 1;
 
-	int h = _bounds.height() - (_type == TYPE_4 ? 30 : 24);
+	int h = _bounds.height() - (_type == kBoxTypeFileDialog ? 30 : 24);
 	int ySize = (h < 0) ? 0 : (h + 12) / 13;
 	int w = _bounds.width() - 24;
 	int xSize = (w < 0) ? 0 : (w + 19) / 20;
@@ -275,21 +275,21 @@ void BubbleBox::doBox(int item, int box) {
 	screen.plotImage(icons, 21, Common::Point(xp, screen._orgY1));
 
 	// Draw images to form the bottom border
-	yp = screen._orgY2 - (_type == TYPE_4 ? 18 : 12);
-	screen.plotImage(icons, (_type == TYPE_4) ? 72 : 22,
+	yp = screen._orgY2 - (_type == kBoxTypeFileDialog ? 18 : 12);
+	screen.plotImage(icons, (_type == kBoxTypeFileDialog) ? 72 : 22,
 		Common::Point(screen._orgX1, yp));
 	xp = screen._orgX1 + 12;
-	yp += (_type == TYPE_4) ? 4 : 8;
+	yp += (_type == kBoxTypeFileDialog) ? 4 : 8;
 
 	for (int x = 0; x < xSize; ++x, xp += 20) {
-		screen.plotImage(icons, (_type == TYPE_4 ? 62 : 34) + x,
+		screen.plotImage(icons, (_type == kBoxTypeFileDialog ? 62 : 34) + x,
 			Common::Point(xp, yp));
 	}
 
-	yp = screen._orgY2 - (_type == TYPE_4 ? 18 : 12);
-	screen.plotImage(icons, (_type == TYPE_4) ? 73 : 23, Common::Point(xp, yp));
+	yp = screen._orgY2 - (_type == kBoxTypeFileDialog ? 18 : 12);
+	screen.plotImage(icons, (_type == kBoxTypeFileDialog) ? 73 : 23, Common::Point(xp, yp));
 
-	if (_type == TYPE_4) {
+	if (_type == kBoxTypeFileDialog) {
 		// Further stuff for filename dialog
 		error("TODO: Box type 4");
 	}
@@ -354,9 +354,9 @@ void BubbleBox::displayBoxData() {
 
 		_vm->_events->hideCursor();
 
-		_vm->_screen->_orgX1 = boxStartX;
+		_vm->_screen->_orgX1 = _boxStartX;
 		_vm->_screen->_orgX2 = _boxEndX;
-		_vm->_screen->_orgY1 = boxStartY;
+		_vm->_screen->_orgY1 = _boxStartY;
 		_vm->_screen->_orgY2 = _boxEndY;
 		_vm->_screen->_lColor = 0xFA;
 		_vm->_screen->drawRect();
@@ -405,7 +405,7 @@ void BubbleBox::drawSelectBox() {
 		int val = _vm->_boxSelectYOld + _boxPStartY + 1;
 		_vm->_screen->_orgY1 = (val << 3) + 2;
 		_vm->_screen->_orgY2 = _vm->_screen->_orgY1 + 7;
-		_vm->_screen->_orgX1 = boxStartX;
+		_vm->_screen->_orgX1 = _boxStartX;
 		_vm->_screen->_orgX2 = _boxEndX;
 		_vm->_screen->drawBox();
 		_vm->_events->showCursor();
@@ -416,7 +416,7 @@ void BubbleBox::drawSelectBox() {
 	int val = _boxPStartY + _vm->_boxSelectY + 1;
 	_vm->_screen->_orgY1 = (val << 3) + 2;
 	_vm->_screen->_orgY2 = _vm->_screen->_orgY1 + 7;
-	_vm->_screen->_orgX1 = boxStartX;
+	_vm->_screen->_orgX1 = _boxStartX;
 	_vm->_screen->_orgX2 = _boxEndX;
 	_vm->_screen->_lColor = 0xFE;
 	_vm->_screen->drawBox();
@@ -489,7 +489,7 @@ int BubbleBox::doBox_v1(int item, int box, int &btnSelected) {
 	_vm->_screen->_orgY2 = _vm->_screen->_orgY1 + 8;
 	_vm->_screen->_lColor = 0xF9;
 
-	boxStartY = _vm->_screen->_orgY2 + 1;
+	_boxStartY = _vm->_screen->_orgY2 + 1;
 	_vm->_screen->_orgY2 = oldY;
 
 	int tmpX = 0;
@@ -503,7 +503,7 @@ int BubbleBox::doBox_v1(int item, int box, int &btnSelected) {
 		_vm->_screen->drawRect();
 		tmpX = _bIconStartX = _vm->_screen->_orgX1;
 
-		boxStartX = tmpX + 1;
+		_boxStartX = tmpX + 1;
 		tmpY = _boxEndY = _vm->_screen->_orgY1;
 
 		if (_type == TYPE_3)
@@ -688,8 +688,8 @@ int BubbleBox::doBox_v1(int item, int box, int &btnSelected) {
 			}
 		}
 
-		if ((_vm->_events->_mousePos.x >= boxStartX) && (_vm->_events->_mousePos.x <= _boxEndX)
-		&&  (_vm->_events->_mousePos.y >= boxStartY) && (_vm->_events->_mousePos.y <= _boxEndY)) {
+		if ((_vm->_events->_mousePos.x >= _boxStartX) && (_vm->_events->_mousePos.x <= _boxEndX)
+		&&  (_vm->_events->_mousePos.y >= _boxStartY) && (_vm->_events->_mousePos.y <= _boxEndY)) {
 			int val = (_vm->_events->_mousePos.x >> 3) - _boxPStartY;
 			if (val > _vm->_bcnt)
 				continue;
diff --git a/engines/access/bubble_box.h b/engines/access/bubble_box.h
index 6d7f3f6..9a45721 100644
--- a/engines/access/bubble_box.h
+++ b/engines/access/bubble_box.h
@@ -36,7 +36,7 @@ namespace Access {
 
 class AccessEngine;
 
-enum BoxType { TYPE_0 = 0, TYPE_1 = 1, TYPE_2 = 2, TYPE_3 = 3, TYPE_4 = 4 };
+enum BoxType { TYPE_0 = 0, TYPE_1 = 1, TYPE_2 = 2, TYPE_3 = 3, kBoxTypeFileDialog = 4 };
 
 class BubbleBox : public Manager {
 private:
@@ -44,7 +44,7 @@ private:
 	int _charCol, _rowOff;
 	Common::Point _fileStart;
 	Common::Point _fileOff;
-	int boxStartX, boxStartY;
+	int _boxStartX, _boxStartY;
 	int _boxEndX, _boxEndY;
 	int _bIconStartX, _bIconStartY;
 	int _boxPStartX, _boxPStartY;






More information about the Scummvm-git-logs mailing list