[Scummvm-git-logs] scummvm master -> 0f3990e13add01eee9a61349158158d46b4bda0e

Strangerke noreply at scummvm.org
Tue Jan 21 08:03:37 UTC 2025


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:
0f3990e13a GOT: Renaming in the gfx folder, remove some unused includes


Commit: 0f3990e13add01eee9a61349158158d46b4bda0e
    https://github.com/scummvm/scummvm/commit/0f3990e13add01eee9a61349158158d46b4bda0e
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-01-21T09:03:29+01:00

Commit Message:
GOT: Renaming in the gfx folder, remove some unused includes

Changed paths:
    engines/got/events.cpp
    engines/got/game/back.cpp
    engines/got/game/boss1.cpp
    engines/got/game/boss2.cpp
    engines/got/game/init.cpp
    engines/got/game/object.cpp
    engines/got/game/script.cpp
    engines/got/game/special_tile.cpp
    engines/got/gfx/font.cpp
    engines/got/gfx/gfx_chunks.cpp
    engines/got/gfx/gfx_pics.cpp
    engines/got/gfx/gfx_pics.h
    engines/got/gfx/image.cpp
    engines/got/gfx/image.h
    engines/got/gfx/palette.cpp
    engines/got/gfx/palette.h
    engines/got/got.cpp
    engines/got/vars.cpp
    engines/got/views/dialogs/high_scores.cpp
    engines/got/views/game.cpp
    engines/got/views/game_content.cpp
    engines/got/views/splash_screen.cpp
    engines/got/views/story.cpp
    engines/got/views/title_background.cpp
    engines/got/views/view.cpp


diff --git a/engines/got/events.cpp b/engines/got/events.cpp
index c109f0484a9..78f1938d470 100644
--- a/engines/got/events.cpp
+++ b/engines/got/events.cpp
@@ -163,7 +163,7 @@ void Events::rotatePalette() {
 			return;
 		}
 
-		Gfx::xsetpal(entry[0] >> 8, (entry[0] & 0xff) << 2,
+		Gfx::xSetPal(entry[0] >> 8, (entry[0] & 0xff) << 2,
 					 (entry[1] >> 8) << 2, (entry[1] & 0xff) << 2);
 	}
 }
@@ -271,7 +271,7 @@ void Events::replaceView(UIElement *ui, bool replaceAllViews, bool fadeOutIn) {
 	UIElement *oldView = focusedView();
 
 	if (fadeOutIn)
-		Gfx::fade_out();
+		Gfx::fadeOut();
 
 	if (replaceAllViews) {
 		clearViews();
@@ -295,7 +295,7 @@ void Events::replaceView(UIElement *ui, bool replaceAllViews, bool fadeOutIn) {
 	ui->draw();
 
 	if (fadeOutIn)
-		Gfx::fade_in();
+		Gfx::fadeIn();
 }
 
 void Events::replaceView(const Common::String &name, bool replaceAllViews, bool fadeOutIn) {
diff --git a/engines/got/game/back.cpp b/engines/got/game/back.cpp
index f0d7de30eed..2caa678754e 100644
--- a/engines/got/game/back.cpp
+++ b/engines/got/game/back.cpp
@@ -67,7 +67,7 @@ void showLevel(const int newLevel) {
 	_G(thor)->_nextFrame = 0;
 
 	showObjects();
-	show_enemies();
+	showEnemies();
 
 	// The original was probably shortly displaying Thor in direction 0 before switching back to its prior position.
 	// This behavior wasn't noticed during initial playthrough by Dreammaster - Warning has been added so it can be checked eventually.
diff --git a/engines/got/game/boss1.cpp b/engines/got/game/boss1.cpp
index 427a63905af..7b187f1ec09 100644
--- a/engines/got/game/boss1.cpp
+++ b/engines/got/game/boss1.cpp
@@ -261,7 +261,7 @@ void boss1ClosingSequence1() {
 
 void boss1ClosingSequence2() {
 	_G(thor_info)._armor = 1;
-	load_new_thor();
+	loadNewThor();
 	_G(thor)->_dir = 1;
 	_G(thor)->_nextFrame = 0;
 	fillScore(20, "CLOSING");
@@ -286,8 +286,8 @@ void boss1ClosingSequence4() {
 	play_sound(ANGEL, true);
 	placeTile(18, 6, 148);
 	placeTile(19, 6, 202);
-	actor_visible(1);
-	actor_visible(2);
+	actorVisible(1);
+	actorVisible(2);
 
 	Level lvl;
 	lvl.load(59);
diff --git a/engines/got/game/boss2.cpp b/engines/got/game/boss2.cpp
index 11e12f19c73..3babd1085bc 100644
--- a/engines/got/game/boss2.cpp
+++ b/engines/got/game/boss2.cpp
@@ -390,7 +390,7 @@ void boss2ClosingSequence1() {
 
 void boss2ClosingSequence2() {
 	_G(thor_info)._armor = 10;
-	load_new_thor();
+	loadNewThor();
 	_G(thor)->_dir = 1;
 	_G(thor)->_nextFrame = 0;
 
@@ -418,8 +418,8 @@ void boss2ClosingSequence4() {
 	play_sound(ANGEL, true);
 	placeTile(18, 10, 152);
 	placeTile(19, 10, 202);
-	actor_visible(1);
-	actor_visible(2);
+	actorVisible(1);
+	actorVisible(2);
 	_G(actor[7])._x = 288;
 	_G(actor[7])._y = 160;
 	_G(actor[8])._x = 304;
diff --git a/engines/got/game/init.cpp b/engines/got/game/init.cpp
index c2869e6150e..955cbd7a1d9 100644
--- a/engines/got/game/init.cpp
+++ b/engines/got/game/init.cpp
@@ -74,7 +74,7 @@ void setupPlayer() {
 }
 
 void initGame() {
-	load_standard_actors();
+	loadStandardActors();
 	setupPlayer();
 
 	if (_G(demo)) {
diff --git a/engines/got/game/object.cpp b/engines/got/game/object.cpp
index c1adc9983a0..35877d84890 100644
--- a/engines/got/game/object.cpp
+++ b/engines/got/game/object.cpp
@@ -291,10 +291,10 @@ bool useShield(int flag) {
 			if (!_G(shield_on)) {
 				_G(magic_cnt) = 0;
 				addMagic(-1);
-				setup_magic_item(1);
+				setupMagicItem(1);
 
 				_G(actor[2]) = _G(magic_item[1]);
-				setup_actor(&_G(actor[2]), 2, 0, _G(thor)->_x, _G(thor)->_y);
+				setupActor(&_G(actor[2]), 2, 0, _G(thor)->_x, _G(thor)->_y);
 				_G(actor[2])._moveCountdown = 1;
 				_G(actor[2])._speed = 1;
 				_G(shield_on) = true;
@@ -337,10 +337,10 @@ bool useTornado(int flag) {
 			if (!_G(tornado_used) && !_G(actor[2])._dead && _G(magic_cnt) > 20) {
 				_G(magic_cnt) = 0;
 				addMagic(-10);
-				setup_magic_item(0);
+				setupMagicItem(0);
 				_G(actor[2]) = _G(magic_item[0]);
 
-				setup_actor(&_G(actor[2]), 2, 0, _G(thor)->_x, _G(thor)->_y);
+				setupActor(&_G(actor[2]), 2, 0, _G(thor)->_x, _G(thor)->_y);
 				_G(actor[2])._lastDir = _G(thor)->_dir;
 				_G(actor[2])._moveType = 16;
 				_G(tornado_used) = true;
diff --git a/engines/got/game/script.cpp b/engines/got/game/script.cpp
index 31fc89f90a0..c45658f95c5 100644
--- a/engines/got/game/script.cpp
+++ b/engines/got/game/script.cpp
@@ -992,7 +992,7 @@ int Scripts::cmd_visible() {
 	if (_lValue < 1 || _lValue > 16)
 		return 6;
 
-	actor_visible((int)_lValue);
+	actorVisible((int)_lValue);
 	return 0;
 }
 
diff --git a/engines/got/game/special_tile.cpp b/engines/got/game/special_tile.cpp
index 631c1e92a69..ba68e682bf2 100644
--- a/engines/got/game/special_tile.cpp
+++ b/engines/got/game/special_tile.cpp
@@ -107,11 +107,11 @@ int specialTileThor(const int x, const int y, const int icon) {
 			_G(exit_flag) = 2;
 		} else if (GAME2) {
 			if (_G(thor)->_dir == 0 && _G(setup).f29 && _G(setup).f21 && !_G(setup).f22) {
-				actor_visible(1);
-				actor_visible(2);
-				actor_visible(3);
-				actor_visible(4);
-				actor_visible(5);
+				actorVisible(1);
+				actorVisible(2);
+				actorVisible(3);
+				actorVisible(4);
+				actorVisible(5);
 				Common::fill(_G(scrn)._actorInvis, _G(scrn)._actorInvis + 16, 0);
 				_G(thunder_flag) = 60;
 				play_sound(THUNDER, true);
diff --git a/engines/got/gfx/font.cpp b/engines/got/gfx/font.cpp
index fd9452da263..f63162b4f4b 100644
--- a/engines/got/gfx/font.cpp
+++ b/engines/got/gfx/font.cpp
@@ -67,18 +67,18 @@ void Font::drawString(Graphics::ManagedSurface *src, const Common::Point &pos, c
 	}
 }
 
-void Font::drawChar(Graphics::Surface *dst, uint32 chr, int x, int y, uint32 color) const {
+void Font::drawChar(Graphics::Surface *dst, const uint32 chr, const int x, const int y, const uint32 color) const {
 	// Character drawing is done twice in the original:
 	// first at y + 1 with color 0, then at y with the given color
 	rawDrawChar(dst, chr, x, y + 1, 0);
 	rawDrawChar(dst, chr, x, y, color);
 }
 
-void Font::rawDrawChar(Graphics::Surface *dst, uint32 chr, int x, int y, uint32 color) const {
+void Font::rawDrawChar(Graphics::Surface *dst, const uint32 chr, const int x, const int y, const uint32 color) const {
 	const Graphics::ManagedSurface &glyph = _font[chr];
 
 	for (int yp = 0; yp < glyph.h; ++yp) {
-		int startY = y + yp;
+		const int startY = y + yp;
 		const byte *srcP = (const byte *)glyph.getBasePtr(0, yp);
 		byte *destP = (byte *)dst->getBasePtr(x, startY);
 
diff --git a/engines/got/gfx/gfx_chunks.cpp b/engines/got/gfx/gfx_chunks.cpp
index 11e2d96eede..bb2692b0809 100644
--- a/engines/got/gfx/gfx_chunks.cpp
+++ b/engines/got/gfx/gfx_chunks.cpp
@@ -131,9 +131,9 @@ Common::SeekableReadStream *GfxChunks::getStream() const {
 	if (fExe.readUint16BE() != MKTAG16('M', 'Z'))
 		error("Invalid exe header");
 
-	int lastPageSize = fExe.readUint16LE();
-	int totalPages = fExe.readUint16LE();
-	int offset = lastPageSize ? ((totalPages - 1) << 9) + lastPageSize : totalPages << 9;
+	const int lastPageSize = fExe.readUint16LE();
+	const int totalPages = fExe.readUint16LE();
+	const int offset = lastPageSize ? ((totalPages - 1) << 9) + lastPageSize : totalPages << 9;
 
 	fExe.seek(offset);
 	if (fExe.readUint16BE() != MKTAG16(0xe2, 0x4a))
diff --git a/engines/got/gfx/gfx_pics.cpp b/engines/got/gfx/gfx_pics.cpp
index 949605b092f..f79a7803bff 100644
--- a/engines/got/gfx/gfx_pics.cpp
+++ b/engines/got/gfx/gfx_pics.cpp
@@ -21,7 +21,6 @@
 
 #include "got/gfx/gfx_pics.h"
 #include "common/file.h"
-#include "common/textconsole.h"
 #include "got/utils/file.h"
 
 namespace Got {
@@ -105,8 +104,8 @@ void BgPics::setArea(int area) {
 }
 
 void BgPics::load() {
-	Common::String fname = Common::String::format("BPICS%d", _area);
-	GfxPics::load(fname, 262);
+	const Common::String name = Common::String::format("BPICS%d", _area);
+	GfxPics::load(name, 262);
 }
 
 } // namespace Gfx
diff --git a/engines/got/gfx/gfx_pics.h b/engines/got/gfx/gfx_pics.h
index 1057fff00f4..5fc113f2b33 100644
--- a/engines/got/gfx/gfx_pics.h
+++ b/engines/got/gfx/gfx_pics.h
@@ -22,7 +22,6 @@
 #ifndef GOT_GFX_GFX_PICS_H
 #define GOT_GFX_GFX_PICS_H
 
-#include "common/array.h"
 #include "graphics/managed_surface.h"
 
 namespace Got {
diff --git a/engines/got/gfx/image.cpp b/engines/got/gfx/image.cpp
index 7d47cd7d811..fa9fb4bd5e2 100644
--- a/engines/got/gfx/image.cpp
+++ b/engines/got/gfx/image.cpp
@@ -40,62 +40,62 @@ static void createSurface(Graphics::ManagedSurface &s, const byte *src) {
 	s.setTransparentColor(0);
 }
 
-void setup_actor(Actor *actr, char num, char dir, int x, int y) {
-	actr->_nextFrame = 0; // Next frame to be shown
-	actr->_frameCount = actr->_frameSpeed;
-	actr->_dir = dir;      // Direction of travel
-	actr->_lastDir = dir; // Last direction of travel
-	if (actr->_directions == 1)
-		actr->_dir = 0;
-	if (actr->_directions == 2)
-		actr->_dir &= 1;
-	if (actr->_directions == 4 && actr->_framesPerDirection == 1) {
-		actr->_dir = 0;
-		actr->_nextFrame = dir;
+void setupActor(Actor *actor, const char num, const char dir, const int x, const int y) {
+	actor->_nextFrame = 0; // Next frame to be shown
+	actor->_frameCount = actor->_frameSpeed;
+	actor->_dir = dir;      // Direction of travel
+	actor->_lastDir = dir; // Last direction of travel
+	if (actor->_directions == 1)
+		actor->_dir = 0;
+	if (actor->_directions == 2)
+		actor->_dir &= 1;
+	if (actor->_directions == 4 && actor->_framesPerDirection == 1) {
+		actor->_dir = 0;
+		actor->_nextFrame = dir;
 	}
 
-	actr->_x = x;                         // Actual X coor
-	actr->_y = y;                         // Actual Y coor
-	actr->_width = 16;                    // Actual X coor
-	actr->_height = 16;                   // Actual Y coor
-	actr->_center = 0;                    // Center of object
-	actr->_lastX[0] = x;                  // Last X coor on each page
-	actr->_lastX[1] = x;
-	actr->_lastY[0] = y;                  // Last Y coor on each page
-	actr->_lastY[1] = y;
-	actr->_active = true;                 // true=active, false=not active
-	actr->_moveCountdown = 8;             // Count down to movement
-	actr->_vulnerableCountdown = STAMINA; // Count down to vulnerability
-	actr->_shotCountdown = 20;            // Count down to another shot
-	actr->_currNumShots = 0;              // # of shots currently on screen
-	actr->_creator = 0;                   // which actor # created this actor
-	actr->_unpauseCountdown = 0;          // Pause must be 0 to move
-	actr->_show = 0;
-	actr->_actorNum = num;
-	actr->_counter = 0;
-	actr->_moveCounter = 0;
-	actr->_edgeCounter = 20;
-	actr->_hitThor = false;
-	actr->_rand = g_engine->getRandomNumber(99);
-	actr->_temp1 = 0;
-	actr->_initHealth = actr->_health;
+	actor->_x = x;                         // Actual X coordinates
+	actor->_y = y;                         // Actual Y coordinates
+	actor->_width = 16;                    // Actual X coordinates
+	actor->_height = 16;                   // Actual Y coordinates
+	actor->_center = 0;                    // Center of object
+	actor->_lastX[0] = x;                  // Last X coordinates on each page
+	actor->_lastX[1] = x;
+	actor->_lastY[0] = y;                  // Last Y coordinates on each page
+	actor->_lastY[1] = y;
+	actor->_active = true;                 // true=active, false=not active
+	actor->_moveCountdown = 8;             // Count down to movement
+	actor->_vulnerableCountdown = STAMINA; // Count down to vulnerability
+	actor->_shotCountdown = 20;            // Count down to another shot
+	actor->_currNumShots = 0;              // # of shots currently on screen
+	actor->_creator = 0;                   // which actor # created this actor
+	actor->_unpauseCountdown = 0;          // Pause must be 0 to move
+	actor->_show = 0;
+	actor->_actorNum = num;
+	actor->_counter = 0;
+	actor->_moveCounter = 0;
+	actor->_edgeCounter = 20;
+	actor->_hitThor = false;
+	actor->_rand = g_engine->getRandomNumber(99);
+	actor->_temp1 = 0;
+	actor->_initHealth = actor->_health;
 }
 
-void make_actor_surface(Actor *actr) {
-	assert(actr->_directions <= 4 && actr->_framesPerDirection <= 4);
-	for (int d = 0; d < actr->_directions; d++) {
-		for (int f = 0; f < actr->_framesPerDirection; f++) {
-			Graphics::ManagedSurface &s = actr->pic[d][f];
+void make_actor_surface(Actor *actor) {
+	assert(actor->_directions <= 4 && actor->_framesPerDirection <= 4);
+	for (int d = 0; d < actor->_directions; d++) {
+		for (int f = 0; f < actor->_framesPerDirection; f++) {
+			Graphics::ManagedSurface &s = actor->pic[d][f];
 			const byte *src = &_G(tmp_buff[256 * ((d * 4) + f)]);
 			createSurface(s, src);
 		}
 	}
 }
 
-int load_standard_actors() {
+int loadStandardActors() {
 	load_actor(0, 100 + _G(thor_info)._armor); // Load Thor
 	_G(actor[0]).loadFixed(_G(tmp_buff) + 5120);
-	setup_actor(&_G(actor[0]), 0, 0, 100, 100);
+	setupActor(&_G(actor[0]), 0, 0, 100, 100);
 	_G(thor) = &_G(actor[0]);
 
 	make_actor_surface(&_G(actor[0]));
@@ -107,7 +107,7 @@ int load_standard_actors() {
 
 	load_actor(0, 103 + _G(thor_info)._armor); // Load hammer
 	_G(actor[1]).loadFixed(_G(tmp_buff) + 5120);
-	setup_actor(&_G(actor[1]), 1, 0, 100, 100);
+	setupActor(&_G(actor[1]), 1, 0, 100, 100);
 	_G(actor[1])._active = false;
 	_G(hammer) = &_G(actor[1]);
 
@@ -116,14 +116,14 @@ int load_standard_actors() {
 	// Load sparkle
 	load_actor(0, 106);
 	_G(sparkle).loadFixed(_G(tmp_buff) + 5120);
-	setup_actor(&_G(sparkle), 20, 0, 100, 100);
+	setupActor(&_G(sparkle), 20, 0, 100, 100);
 	_G(sparkle)._active = false;
 	make_actor_surface(&_G(sparkle));
 
 	// Load explosion
 	load_actor(0, 107);
 	_G(explosion).loadFixed(_G(tmp_buff) + 5120);
-	setup_actor(&_G(explosion), 21, 0, 100, 100);
+	setupActor(&_G(explosion), 21, 0, 100, 100);
 	_G(explosion)._active = false;
 	make_actor_surface(&_G(explosion));
 
@@ -132,7 +132,7 @@ int load_standard_actors() {
 	_G(magic_item[0]).loadFixed((const byte *)_G(tmp_buff) + 5120);
 	Common::copy(_G(tmp_buff), _G(tmp_buff) + 1024, _G(magic_pic[0]));
 
-	setup_actor(&_G(magic_item[0]), 20, 0, 0, 0);
+	setupActor(&_G(magic_item[0]), 20, 0, 0, 0);
 	_G(magic_item[0])._active = false;
 
 	// Load shield
@@ -140,7 +140,7 @@ int load_standard_actors() {
 	_G(magic_item[1]).loadFixed((const byte *)_G(tmp_buff) + 5120);
 	Common::copy(_G(tmp_buff), _G(tmp_buff) + 1024, _G(magic_pic[1]));
 
-	setup_actor(&_G(magic_item[1]), 20, 0, 0, 0);
+	setupActor(&_G(magic_item[1]), 20, 0, 0, 0);
 	_G(magic_item[1])._active = false;
 
 	_G(actor[2])._active = false;
@@ -150,7 +150,7 @@ int load_standard_actors() {
 	return 1;
 }
 
-void show_enemies() {
+void showEnemies() {
 	for (int i = 3; i < MAX_ACTORS; i++)
 		_G(actor[i])._active = false;
 
@@ -159,13 +159,13 @@ void show_enemies() {
 
 	for (int i = 0; i < MAX_ENEMIES; i++) {
 		if (_G(scrn)._actorType[i] > 0) {
-			int r = load_enemy(_G(scrn)._actorType[i]);
-			if (r >= 0) {
-				_G(actor[i + 3]) = _G(enemy[r]);
+			const int id = loadEnemy(_G(scrn)._actorType[i]);
+			if (id >= 0) {
+				_G(actor[i + 3]) = _G(enemy[id]);
 
-				int d = _G(scrn)._actorDir[i];
+				const int d = _G(scrn)._actorDir[i];
 
-				setup_actor(&_G(actor[i + 3]), i + 3, d, (_G(scrn)._actorLoc[i] % 20) * 16,
+				setupActor(&_G(actor[i + 3]), i + 3, d, (_G(scrn)._actorLoc[i] % 20) * 16,
 							(_G(scrn)._actorLoc[i] / 20) * 16);
 				_G(actor[i + 3])._initDir = _G(scrn)._actorDir[i];
 				_G(actor[i + 3])._passValue = _G(scrn)._actorValue[i];
@@ -180,12 +180,12 @@ void show_enemies() {
 					_G(actor[i + 3])._active = false;
 			}
 
-			_G(etype[i]) = r;
+			_G(etype[i]) = id;
 		}
 	}
 }
 
-int load_enemy(int type) {
+int loadEnemy(const int type) {
 	for (int i = 0; i < MAX_ENEMIES; i++) {
 		if (_G(enemy_type[i]) == type)
 			return i;
@@ -237,15 +237,15 @@ int load_enemy(int type) {
 	return e;
 }
 
-int actor_visible(int invis_num) {
+int actorVisible(const int invisNum) {
 	for (int i = 0; i < MAX_ENEMIES; i++) {
-		if (_G(scrn)._actorInvis[i] == invis_num) {
-			int etype = _G(etype[i]);
+		if (_G(scrn)._actorInvis[i] == invisNum) {
+			const int etype = _G(etype[i]);
 			if (etype >= 0 && !_G(actor[i + 3])._active) {
 				_G(actor[i + 3]) = _G(enemy[etype]);
 
 				int d = _G(scrn)._actorDir[i];
-				setup_actor(&_G(actor[i + 3]), i + 3, d, (_G(scrn)._actorLoc[i] % 20) * 16,
+				setupActor(&_G(actor[i + 3]), i + 3, d, (_G(scrn)._actorLoc[i] % 20) * 16,
 							(_G(scrn)._actorLoc[i] / 20) * 16);
 				_G(actor[i + 3])._initDir = _G(scrn)._actorDir[i];
 				_G(actor[i + 3])._passValue = _G(scrn)._actorValue[i];
@@ -258,13 +258,13 @@ int actor_visible(int invis_num) {
 	return -1;
 }
 
-void setup_magic_item(int item) {
+void setupMagicItem(const int item) {
 	for (int i = 0; i < 4; i++) {
 		createSurface(_G(magic_item[item]).pic[i / 4][i % 4], &_G(magic_pic[item][256 * i]));
 	}
 }
 
-void load_new_thor() {
+void loadNewThor() {
 	load_actor(0, 100 + _G(thor_info)._armor); // Load Thor
 
 	make_actor_surface(&_G(actor[0]));
diff --git a/engines/got/gfx/image.h b/engines/got/gfx/image.h
index 2f4cc111e8c..9f0595d691e 100644
--- a/engines/got/gfx/image.h
+++ b/engines/got/gfx/image.h
@@ -26,16 +26,13 @@
 
 namespace Got {
 
-//extern uint make_mask(MASK_IMAGE *new_image, uint page_start,
-//	byte *Image, int image_width, int image_height);
-extern void setup_actor(Actor *actr, char num, char dir, int x, int y);
-extern void make_actor_mask(Actor *actr);
-extern int load_standard_actors();
-extern void show_enemies();
-extern int load_enemy(int type);
-extern int actor_visible(int invis_num);
-extern void setup_magic_item(int item);
-extern void load_new_thor();
+extern void setupActor(Actor *actor, char num, char dir, int x, int y);
+extern int loadStandardActors();
+extern void showEnemies();
+extern int loadEnemy(int type);
+extern int actorVisible(int invisNum);
+extern void setupMagicItem(int item);
+extern void loadNewThor();
 
 } // namespace Got
 
diff --git a/engines/got/gfx/palette.cpp b/engines/got/gfx/palette.cpp
index 5d8c3ee4830..674b1413fa4 100644
--- a/engines/got/gfx/palette.cpp
+++ b/engines/got/gfx/palette.cpp
@@ -39,50 +39,50 @@ Palette63::Palette63(const byte *pal) {
 		_pal[i] = pal[i] << 2;
 }
 
-void load_palette() {
+void loadPalette() {
 	if (res_read("PALETTE", saved_palette) < 0)
 		error("Cannot Read PALETTE");
 
 	g_system->getPaletteManager()->setPalette(saved_palette, 0, 256);
 }
 
-void set_screen_pal() {
+void setScreenPal() {
 	byte pal[3];
 
-	xgetpal(pal, 1, _G(scrn)._palColors[0]);
-	xsetpal(251, pal[0], pal[1], pal[2]);
-	xgetpal(pal, 1, _G(scrn)._palColors[1]);
-	xsetpal(252, pal[0], pal[1], pal[2]);
-	xgetpal(pal, 1, _G(scrn)._palColors[2]);
-	xsetpal(253, pal[0], pal[1], pal[2]);
+	xGetPal(pal, 1, _G(scrn)._palColors[0]);
+	xSetPal(251, pal[0], pal[1], pal[2]);
+	xGetPal(pal, 1, _G(scrn)._palColors[1]);
+	xSetPal(252, pal[0], pal[1], pal[2]);
+	xGetPal(pal, 1, _G(scrn)._palColors[2]);
+	xSetPal(253, pal[0], pal[1], pal[2]);
 }
 
-void xsetpal(byte color, byte R, byte G, byte B) {
+void xSetPal(const byte color, const byte R, const byte G, const byte B) {
 	byte rgb[3] = {R, G, B};
 	g_system->getPaletteManager()->setPalette(rgb, color, 1);
 }
 
-void xsetpal(const byte *pal) {
+void xSetPal(const byte *pal) {
 	g_system->getPaletteManager()->setPalette(pal, 0, PALETTE_COUNT);
 }
 
-void set_palette(const byte *pal) {
-	xsetpal(pal);
+void setPalette(const byte *pal) {
+	xSetPal(pal);
 	Common::copy(pal, pal + PALETTE_SIZE, saved_palette);
 }
 
-void xgetpal(byte *pal, int num_colrs, int start_index) {
-	g_system->getPaletteManager()->grabPalette(pal, start_index, num_colrs);
+void xGetPal(byte *pal, const int numColors, const int startIndex) {
+	g_system->getPaletteManager()->grabPalette(pal, startIndex, numColors);
 }
 
-void fade_out() {
+void fadeOut() {
 	byte tempPal[PALETTE_SIZE];
 	const byte *srcP;
 	byte *destP;
 	int count;
 	Common::Event evt;
 
-	xgetpal(saved_palette, PALETTE_COUNT, 0);
+	xGetPal(saved_palette, PALETTE_COUNT, 0);
 
 	for (int step = FADE_STEPS - 1; step >= 0; --step) {
 		// Set each palette RGB proportionately
@@ -92,7 +92,7 @@ void fade_out() {
 		}
 
 		// Set new palette
-		xsetpal(tempPal);
+		xSetPal(tempPal);
 
 		// Use up any pending events and update the screen
 		while (g_system->getEventManager()->pollEvent(evt)) {
@@ -105,7 +105,7 @@ void fade_out() {
 	}
 }
 
-void fade_in(const byte *pal) {
+void fadeIn(const byte *pal) {
 	byte tempPal[PALETTE_SIZE];
 	const byte *srcP;
 	byte *destP;
@@ -117,7 +117,7 @@ void fade_in(const byte *pal) {
 
 	// Start with a black palette
 	Common::fill(tempPal, tempPal + PALETTE_SIZE, 0);
-	xsetpal(tempPal);
+	xSetPal(tempPal);
 
 	for (int step = 1; step <= FADE_STEPS; ++step) {
 		// Set each palette RGB proportionately
@@ -127,7 +127,7 @@ void fade_in(const byte *pal) {
 		}
 
 		// Set new palette
-		xsetpal(tempPal);
+		xSetPal(tempPal);
 
 		// Use up any pending events and update the screen
 		while (g_system->getEventManager()->pollEvent(evt)) {
diff --git a/engines/got/gfx/palette.h b/engines/got/gfx/palette.h
index 23bb42f906a..037cd574aae 100644
--- a/engines/got/gfx/palette.h
+++ b/engines/got/gfx/palette.h
@@ -37,14 +37,14 @@ struct Palette63 {
 	}
 };
 
-extern void load_palette();
-extern void set_screen_pal();
-extern void set_palette(const byte *pal);
-extern void xsetpal(byte color, byte R, byte G, byte B);
-extern void xsetpal(const byte *pal);
-extern void xgetpal(byte *pal, int num_colrs, int start_index);
-extern void fade_out();
-extern void fade_in(const byte *pal = nullptr);
+extern void loadPalette();
+extern void setScreenPal();
+extern void setPalette(const byte *pal);
+extern void xSetPal(byte color, byte R, byte G, byte B);
+extern void xSetPal(const byte *pal);
+extern void xGetPal(byte *pal, int numColors, int startIndex);
+extern void fadeOut();
+extern void fadeIn(const byte *pal = nullptr);
 
 } // namespace Gfx
 } // namespace Got
diff --git a/engines/got/got.cpp b/engines/got/got.cpp
index 23b0b1da8a9..af99f34650d 100644
--- a/engines/got/got.cpp
+++ b/engines/got/got.cpp
@@ -151,7 +151,7 @@ void GotEngine::savegameLoaded() {
 	_G(thor)->_vulnerableCountdown = 60;
 	_G(thor)->_show = 60;
 	_G(thor)->_moveCountdown = 6;
-	load_new_thor();
+	loadNewThor();
 
 	g_vars->resetEndgameFlags();
 
diff --git a/engines/got/vars.cpp b/engines/got/vars.cpp
index e90a5569830..3f6785a1eb8 100644
--- a/engines/got/vars.cpp
+++ b/engines/got/vars.cpp
@@ -71,7 +71,7 @@ void Vars::load() {
 
 	res_read("RANDOM", _rnd_array);
 
-	Gfx::load_palette();
+	Gfx::loadPalette();
 }
 
 Vars::~Vars() {
diff --git a/engines/got/views/dialogs/high_scores.cpp b/engines/got/views/dialogs/high_scores.cpp
index d0f45062999..782c20db860 100644
--- a/engines/got/views/dialogs/high_scores.cpp
+++ b/engines/got/views/dialogs/high_scores.cpp
@@ -77,7 +77,7 @@ bool HighScores::msgFocus(const FocusMessage &msg) {
 	_showAll = true;
 	_timeoutCtr = TIMEOUT;
 
-	Gfx::load_palette();
+	Gfx::loadPalette();
 	return true;
 }
 
diff --git a/engines/got/views/game.cpp b/engines/got/views/game.cpp
index fb81a861b2d..3786f1394c5 100644
--- a/engines/got/views/game.cpp
+++ b/engines/got/views/game.cpp
@@ -39,7 +39,7 @@ Game::Game() : View("Game") {
 }
 
 bool Game::msgFocus(const FocusMessage &msg) {
-	Gfx::load_palette();
+	Gfx::loadPalette();
 	return View::msgFocus(msg);
 }
 
diff --git a/engines/got/views/game_content.cpp b/engines/got/views/game_content.cpp
index e3afdeb943b..328e91e162f 100644
--- a/engines/got/views/game_content.cpp
+++ b/engines/got/views/game_content.cpp
@@ -212,7 +212,7 @@ bool GameContent::tick() {
 	// Check for end of game area
 	if (_G(end_tile)) {
 		_G(end_tile) = false;
-		Gfx::fade_out();
+		Gfx::fadeOut();
 
 		// Add name to high scores list if necessary, and then show it
 		_G(highScores).add(_G(area), _G(playerName), _G(thor_info)._score);
diff --git a/engines/got/views/splash_screen.cpp b/engines/got/views/splash_screen.cpp
index 702b905576d..1fed74f70fb 100644
--- a/engines/got/views/splash_screen.cpp
+++ b/engines/got/views/splash_screen.cpp
@@ -53,11 +53,11 @@ bool SplashScreen::msgFocus(const FocusMessage &msg) {
 	// This is the first screen shown, so start with black, and fade it in
 	byte blackPal[PALETTE_SIZE];
 	Common::fill(blackPal, blackPal + PALETTE_SIZE, 0);
-	Gfx::xsetpal(blackPal);
+	Gfx::xSetPal(blackPal);
 
 	draw();
 	Gfx::Palette63 pal = _G(gfx[91]);
-	Gfx::fade_in(pal);
+	Gfx::fadeIn(pal);
 
 	return true;
 }
diff --git a/engines/got/views/story.cpp b/engines/got/views/story.cpp
index 2a656a5ec94..e5f564dde85 100644
--- a/engines/got/views/story.cpp
+++ b/engines/got/views/story.cpp
@@ -37,7 +37,7 @@ bool Story::msgFocus(const FocusMessage &msg) {
 
 	for (int i = 0; i < PALETTE_SIZE; ++i)
 		_G(pbuff[i]) = ((int)_G(pbuff[i]) * 255 + 31) / 63;
-	Gfx::set_palette(_G(pbuff));
+	Gfx::setPalette(_G(pbuff));
 
 	// Create story image and load in it's fragments
 	_surface.create(320, 240 * 2);
@@ -159,7 +159,7 @@ void Story::done() {
 	music_stop();
 
 	fadeOut();
-	Gfx::load_palette();
+	Gfx::loadPalette();
 	replaceView("PartTitle");
 	fadeIn();
 }
diff --git a/engines/got/views/title_background.cpp b/engines/got/views/title_background.cpp
index afc9ff24bd1..3bd4d3982fc 100644
--- a/engines/got/views/title_background.cpp
+++ b/engines/got/views/title_background.cpp
@@ -29,7 +29,7 @@ bool TitleBackground::msgGame(const GameMessage &msg) {
 	if (msg._name == "MAIN_MENU") {
 		replaceView("TitleBackground", true);
 		draw();
-		Gfx::load_palette();
+		Gfx::loadPalette();
 		fadeIn();
 
 		addView("MainMenu");
diff --git a/engines/got/views/view.cpp b/engines/got/views/view.cpp
index 6db1a3ba969..3374a9397d8 100644
--- a/engines/got/views/view.cpp
+++ b/engines/got/views/view.cpp
@@ -113,11 +113,11 @@ bool View::music_is_on() const {
 }
 
 void View::fadeOut() {
-	Gfx::fade_out();
+	Gfx::fadeOut();
 }
 
 void View::fadeIn(const byte *pal) {
-	Gfx::fade_in(pal);
+	Gfx::fadeIn(pal);
 }
 
 } // namespace Views




More information about the Scummvm-git-logs mailing list