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

Strangerke noreply at scummvm.org
Wed Jan 22 03:37:28 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:
adee10d0b4 GOT: More renaming in the Views folder


Commit: adee10d0b457eb9606603d6a4c6f2f8273dbab3f
    https://github.com/scummvm/scummvm/commit/adee10d0b457eb9606603d6a4c6f2f8273dbab3f
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-01-22T04:36:56+01:00

Commit Message:
GOT: More renaming in the Views folder

Changed paths:
    engines/got/console.cpp
    engines/got/views/dialogs/say.cpp
    engines/got/views/dialogs/select_item.cpp
    engines/got/views/dialogs/select_option.cpp
    engines/got/views/game_content.cpp
    engines/got/views/opening.cpp
    engines/got/views/story.cpp
    engines/got/views/view.cpp
    engines/got/views/view.h


diff --git a/engines/got/console.cpp b/engines/got/console.cpp
index cfb95490b8b..b5642e16996 100644
--- a/engines/got/console.cpp
+++ b/engines/got/console.cpp
@@ -73,8 +73,8 @@ bool Console::cmdLoad(int argc, const char **argv) {
 	if (argc == 2)
 		filename = argv[1];
 
-	Common::InSaveFile *f;
-	if ((f = g_system->getSavefileManager()->openForLoading(filename)) == nullptr) {
+	Common::InSaveFile *f = g_system->getSavefileManager()->openForLoading(filename);
+	if (f == nullptr) {
 		debugPrintf("Could not open %s\n", filename.c_str());
 		return true;
 	}
diff --git a/engines/got/views/dialogs/say.cpp b/engines/got/views/dialogs/say.cpp
index 37b5e196986..4ad758adde2 100644
--- a/engines/got/views/dialogs/say.cpp
+++ b/engines/got/views/dialogs/say.cpp
@@ -40,7 +40,7 @@ void Say::show(int item, const Gfx::Pics &speakerIcon, int type) {
 
 bool Say::msgFocus(const FocusMessage &msg) {
 	if (!_type)
-		play_sound(WOOP, true);
+		playSound(WOOP, true);
 
 	_content = (const char *)_G(tmp_buff);
 	_contentLength = 0;
@@ -160,7 +160,7 @@ bool Say::tick() {
 		}
 
 		if (_type) {
-			play_sound(WOOP, true);
+			playSound(WOOP, true);
 			_woopCtr = 0;
 		}
 
diff --git a/engines/got/views/dialogs/select_item.cpp b/engines/got/views/dialogs/select_item.cpp
index 08760849ac5..8bbbc84e4b8 100644
--- a/engines/got/views/dialogs/select_item.cpp
+++ b/engines/got/views/dialogs/select_item.cpp
@@ -127,7 +127,7 @@ bool SelectItem::msgAction(const ActionMessage &msg) {
 				break;
 		}
 
-		play_sound(WOOP, true);
+		playSound(WOOP, true);
 		redraw();
 		break;
 
@@ -143,7 +143,7 @@ bool SelectItem::msgAction(const ActionMessage &msg) {
 				break;
 		}
 
-		play_sound(WOOP, true);
+		playSound(WOOP, true);
 		redraw();
 		break;
 
diff --git a/engines/got/views/dialogs/select_option.cpp b/engines/got/views/dialogs/select_option.cpp
index 265893c9402..6e8ddaa9981 100644
--- a/engines/got/views/dialogs/select_option.cpp
+++ b/engines/got/views/dialogs/select_option.cpp
@@ -101,13 +101,13 @@ bool SelectOption::msgAction(const ActionMessage &msg) {
 
 	switch (msg._action) {
 	case KEYBIND_UP:
-		play_sound(WOOP, true);
+		playSound(WOOP, true);
 		if (--_selectedItem < 0)
 			_selectedItem = (int)_options.size() - 1;
 		break;
 
 	case KEYBIND_DOWN:
-		play_sound(WOOP, true);
+		playSound(WOOP, true);
 		if (++_selectedItem >= (int)_options.size())
 			_selectedItem = 0;
 		break;
@@ -139,7 +139,7 @@ bool SelectOption::tick() {
 	if (_smackCtr != 0) {
 		++_smackCtr;
 		if (_smackCtr == 3)
-			play_sound(CLANG, true);
+			playSound(CLANG, true);
 		if (_smackCtr == 6) {
 			_smackCtr = 0;
 			close();
diff --git a/engines/got/views/game_content.cpp b/engines/got/views/game_content.cpp
index 5987b7a127e..b4b6c736a31 100644
--- a/engines/got/views/game_content.cpp
+++ b/engines/got/views/game_content.cpp
@@ -179,19 +179,19 @@ bool GameContent::tick() {
 
 			if (_G(thor)->_health > 0) {
 				_G(thor)->_health--;
-				play_sound(WOOP, true);
+				playSound(WOOP, true);
 				addHealth(-1);
 				addScore(10);
 
 			} else if (_G(thor_info)._magic > 0) {
 				_G(thor_info)._magic--;
-				play_sound(WOOP, true);
+				playSound(WOOP, true);
 				addMagic(-1);
 				addScore(10);
 
 			} else if (_G(thor_info)._jewels) {
 				_G(thor_info)._jewels--;
-				play_sound(WOOP, true);
+				playSound(WOOP, true);
 				addJewels(-1);
 				addScore(10);
 
@@ -495,7 +495,7 @@ void GameContent::thorDies() {
 	_deathCtr = 0;
 	_G(shield_on) = false;
 
-	play_sound(DEAD, true);
+	playSound(DEAD, true);
 }
 
 void GameContent::spinThor() {
@@ -551,7 +551,7 @@ void GameContent::thorDead() {
 	_G(lightning_used) = false;
 	_G(tornado_used) = false;
 	_G(shield_on) = false;
-	music_resume();
+	musicResume();
 	_G(actor[1])._active = false;
 	_G(actor[2])._active = false;
 	_G(thor)->_moveCountdown = 6;
@@ -649,7 +649,7 @@ void GameContent::throwLightning() {
 	for (int i = 0; i < MAX_ACTORS; i++)
 		_G(actor[i])._show = 0;
 
-	play_sound(ELECTRIC, true);
+	playSound(ELECTRIC, true);
 }
 
 void GameContent::drawLightning(GfxSurface &s) {
diff --git a/engines/got/views/opening.cpp b/engines/got/views/opening.cpp
index aabda928a7d..6a1f3ec6b76 100644
--- a/engines/got/views/opening.cpp
+++ b/engines/got/views/opening.cpp
@@ -91,7 +91,7 @@ bool Opening::tick() {
 	if (_frameCtr == 20) {
 		drawTitle();
 		redraw();
-		play_sound(_G(gfx[104]));
+		playSound(_G(gfx[104]));
 	} else if (_frameCtr < 40) {
 		if ((_frameCtr % 4) == 0) {
 			_shakeX = g_engine->getRandomNumber(19) - 10;
diff --git a/engines/got/views/story.cpp b/engines/got/views/story.cpp
index c86c9ac33cb..c73c6ef89c4 100644
--- a/engines/got/views/story.cpp
+++ b/engines/got/views/story.cpp
@@ -101,7 +101,7 @@ bool Story::msgFocus(const FocusMessage &msg) {
 	}
 
 	// Play the opening music
-	music_play("OPENSONG", 1);
+	musicPlay("OPENSONG", 1);
 
 	_yp = 0;
 	_scrolling = false;
@@ -111,7 +111,7 @@ bool Story::msgFocus(const FocusMessage &msg) {
 
 bool Story::msgUnfocus(const UnfocusMessage &msg) {
 	_surface.clear();
-	music_pause();
+	musicPause();
 
 	return true;
 }
@@ -156,7 +156,7 @@ bool Story::tick() {
 }
 
 void Story::done() {
-	music_stop();
+	musicStop();
 
 	fadeOut();
 	Gfx::loadPalette();
diff --git a/engines/got/views/view.cpp b/engines/got/views/view.cpp
index 3374a9397d8..c0e19bed640 100644
--- a/engines/got/views/view.cpp
+++ b/engines/got/views/view.cpp
@@ -80,35 +80,35 @@ bool View::msgMouseUp(const MouseUpMessage &msg) {
 	return child ? child->send(msg) : false;
 }
 
-void View::play_sound(int index, bool priority_override) {
+void View::playSound(int index, bool priority_override) {
 	_G(sound).play_sound(index, priority_override);
 }
 
-void View::play_sound(const Gfx::GraphicChunk &src) {
+void View::playSound(const Gfx::GraphicChunk &src) {
 	_G(sound).play_sound(src);
 }
 
-void View::music_play(int num, bool override) {
+void View::musicPlay(int num, bool override) {
 	_G(sound).music_play(num, override);
 }
 
-void View::music_play(const char *name, bool override) {
+void View::musicPlay(const char *name, bool override) {
 	_G(sound).music_play(name, override);
 }
 
-void View::music_pause() {
+void View::musicPause() {
 	_G(sound).music_pause();
 }
 
-void View::music_resume() {
+void View::musicResume() {
 	_G(sound).music_resume();
 }
 
-void View::music_stop() {
+void View::musicStop() {
 	_G(sound).music_stop();
 }
 
-bool View::music_is_on() const {
+bool View::musicIsOn() const {
 	return _G(sound).music_is_on();
 }
 
diff --git a/engines/got/views/view.h b/engines/got/views/view.h
index 85713be4b51..b0e213f63db 100644
--- a/engines/got/views/view.h
+++ b/engines/got/views/view.h
@@ -54,15 +54,15 @@ private:
 	UIElement *getElementAtPos(const Common::Point &pos) const;
 
 protected:
-	void play_sound(int index, bool priority_override);
-	void play_sound(const Gfx::GraphicChunk &src);
+	void playSound(int index, bool priority_override);
+	void playSound(const Gfx::GraphicChunk &src);
 
-	void music_play(int num, bool override);
-	void music_play(const char *name, bool override);
-	void music_pause();
-	void music_resume();
-	void music_stop();
-	bool music_is_on() const;
+	void musicPlay(int num, bool override);
+	void musicPlay(const char *name, bool override);
+	void musicPause();
+	void musicResume();
+	void musicStop();
+	bool musicIsOn() const;
 
 	void fadeOut();
 	void fadeIn(const byte *pal = nullptr);




More information about the Scummvm-git-logs mailing list