[Scummvm-git-logs] scummvm master -> 146941f36893b9e750136ac601acfdf05608ebb7

alxpnv a04198622 at gmail.com
Mon Oct 25 10:05:22 UTC 2021


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
7ba4414409 ASYLUM: fix "No game has been loaded"
146941f368 ASYLUM: formatting


Commit: 7ba4414409d07d459b96f142b4328ca323bd894e
    https://github.com/scummvm/scummvm/commit/7ba4414409d07d459b96f142b4328ca323bd894e
Author: alxpnv (alxpnv22 at yahoo.com)
Date: 2021-10-25T12:11:35+03:00

Commit Message:
ASYLUM: fix "No game has been loaded"

Reported by Attx

Changed paths:
    engines/asylum/views/menu.cpp


diff --git a/engines/asylum/views/menu.cpp b/engines/asylum/views/menu.cpp
index c76b0f9d32..7f8ce1ce46 100644
--- a/engines/asylum/views/menu.cpp
+++ b/engines/asylum/views/menu.cpp
@@ -353,7 +353,7 @@ bool Menu::init() {
 			//  - initialize game structures (this is done in classes constructors)
 			getSaveLoad()->loadMoviesViewed();
 
-			_showMovie = true;
+			_showMovie = !_loadingDuringStartup;
 
 			// Play start video
 			if (!_loadingDuringStartup)


Commit: 146941f36893b9e750136ac601acfdf05608ebb7
    https://github.com/scummvm/scummvm/commit/146941f36893b9e750136ac601acfdf05608ebb7
Author: alxpnv (alxpnv22 at yahoo.com)
Date: 2021-10-25T13:07:57+03:00

Commit Message:
ASYLUM: formatting

Changed paths:
    engines/asylum/puzzles/pipes.cpp
    engines/asylum/puzzles/puzzles.h
    engines/asylum/resources/actor.cpp
    engines/asylum/resources/actor.h
    engines/asylum/resources/script.h
    engines/asylum/resources/special.cpp
    engines/asylum/resources/special.h
    engines/asylum/resources/worldstats.cpp
    engines/asylum/resources/worldstats.h
    engines/asylum/respack.h
    engines/asylum/system/config.cpp
    engines/asylum/system/savegame.h
    engines/asylum/system/screen.cpp
    engines/asylum/system/screen.h
    engines/asylum/system/text.cpp
    engines/asylum/views/menu.cpp
    engines/asylum/views/scene.cpp
    engines/asylum/views/scene.h


diff --git a/engines/asylum/puzzles/pipes.cpp b/engines/asylum/puzzles/pipes.cpp
index 732494b1b5..b443050c35 100644
--- a/engines/asylum/puzzles/pipes.cpp
+++ b/engines/asylum/puzzles/pipes.cpp
@@ -540,7 +540,7 @@ void PuzzlePipes::setup() {
 
 	if (i) {
 		_frameIndexSpider = new uint32[_spiders.size()];
-		memset(_frameIndexSpider, 0, _spiders.size()*sizeof(uint32));
+		memset(_frameIndexSpider, 0, _spiders.size() * sizeof(uint32));
 	}
 }
 
diff --git a/engines/asylum/puzzles/puzzles.h b/engines/asylum/puzzles/puzzles.h
index ff161b77a8..acbb6eab8b 100644
--- a/engines/asylum/puzzles/puzzles.h
+++ b/engines/asylum/puzzles/puzzles.h
@@ -50,13 +50,13 @@ public:
 	 *
 	 * @return The message handler.
 	 */
-	EventHandler* getPuzzle(uint32 index) const;
+	EventHandler *getPuzzle(uint32 index) const;
 
 	// Serializable
 	void saveLoadWithSerializer(Common::Serializer &s);
 
 private:
-	AsylumEngine* _vm;
+	AsylumEngine *_vm;
 	Puzzle *_puzzles[17];
 
 	/**
diff --git a/engines/asylum/resources/actor.cpp b/engines/asylum/resources/actor.cpp
index 3a58e9edff..a602f82728 100644
--- a/engines/asylum/resources/actor.cpp
+++ b/engines/asylum/resources/actor.cpp
@@ -1568,7 +1568,7 @@ void Actor::setupReflectionData(ActorIndex nextActor, int32 actionAreaId, ActorD
 	updateReflectionData();
 }
 
-bool Actor::aNicePlaceToTalk(Common::Point *point, int32* param) {
+bool Actor::aNicePlaceToTalk(Common::Point *point, int32 *param) {
 	Actor *player = getScene()->getActor();
 
 	int16 offset = 65;
@@ -2735,7 +2735,7 @@ void Actor::MaxAttacks() {
 			if (otherActor->getStatus() == kActorStatusEnabled2) {
 				// FIXME: this is a bit strange, but it looks like the original does exactly that
 				// this might be dead code (the actor 38 never exists and thus setting values has no effect)
-				Actor* actor38 = getScene()->getActor(38);
+				Actor *actor38 = getScene()->getActor(38);
 				actor38->setFrameIndex(0);
 				*actor38->getPoint1() = *otherActor->getPoint1();
 
diff --git a/engines/asylum/resources/actor.h b/engines/asylum/resources/actor.h
index 8c30792643..1005e3dfbb 100644
--- a/engines/asylum/resources/actor.h
+++ b/engines/asylum/resources/actor.h
@@ -288,7 +288,7 @@ public:
 	bool canReach(const Common::Point &point);
 	void forceTo(int16 actorX, int16 actorY, bool doSpeech);
 	void setupReflectionData(ActorIndex nextActor, int32 actionAreaId, ActorDirection nextDirection, const Common::Point &nextPosition, bool invertPriority, const Common::Point &nextPositionOffset);
-	bool aNicePlaceToTalk(Common::Point *point, int32* param);
+	bool aNicePlaceToTalk(Common::Point *point, int32 *param);
 	bool canMove(Common::Point *point, ActorDirection direction, uint32 count, bool hasDelta);
 	void move(ActorDirection dir, uint32 distance);
 	bool testActorCollision(Common::Point *point, ActorDirection direction);
diff --git a/engines/asylum/resources/script.h b/engines/asylum/resources/script.h
index fedc8fed05..c03d7af214 100644
--- a/engines/asylum/resources/script.h
+++ b/engines/asylum/resources/script.h
@@ -315,7 +315,7 @@ private:
 		const char    *name;
 		OpcodeFunctor *func;
 
-		Opcode(const char* opcodeName, OpcodeFunctor *functor) {
+		Opcode(const char *opcodeName, OpcodeFunctor *functor) {
 			name = opcodeName;
 			func = functor;
 		}
diff --git a/engines/asylum/resources/special.cpp b/engines/asylum/resources/special.cpp
index af1608b8b1..3ac45c1e6e 100644
--- a/engines/asylum/resources/special.cpp
+++ b/engines/asylum/resources/special.cpp
@@ -71,7 +71,7 @@ Special::Special(AsylumEngine *engine) : _vm(engine) {
 	_chapter5Counter = 0;
 }
 
-void Special::run(Object* object, ActorIndex index) {
+void Special::run(Object *object, ActorIndex index) {
 	switch (getWorld()->chapter) {
 	default:
 	case kChapterNone:
@@ -667,7 +667,7 @@ void Special::chapter9(Object *object, ActorIndex actorIndex) {
 	if (actorIndex != kActorInvalid)
 		return;
 
-	switch(object->getId()) {
+	switch (object->getId()) {
 	default:
 		break;
 
@@ -1252,7 +1252,7 @@ void Special::playSoundChapter1(Object *object, ActorIndex actorIndex) {
 		return;
 
 	if (actorIndex == kActorInvalid) {
-		switch(object->getId()) {
+		switch (object->getId()) {
 		default:
 			break;
 
@@ -1286,7 +1286,7 @@ void Special::playSoundChapter1(Object *object, ActorIndex actorIndex) {
 
 void Special::playSoundChapter2(Object *object, ActorIndex actorIndex) {
 	if (actorIndex == kActorInvalid) {
-		switch(object->getId()) {
+		switch (object->getId()) {
 		default:
 			break;
 
@@ -1361,7 +1361,7 @@ void Special::playSoundChapter2(Object *object, ActorIndex actorIndex) {
 
 void Special::playSoundChapter3(Object *object, ActorIndex actorIndex) {
 	if (actorIndex == kActorInvalid) {
-		switch(object->getId()) {
+		switch (object->getId()) {
 		default:
 			break;
 
@@ -1440,7 +1440,7 @@ void Special::playSoundChapter3(Object *object, ActorIndex actorIndex) {
 
 void Special::playSoundChapter4(Object *object, ActorIndex actorIndex) {
 	if (actorIndex == kActorInvalid) {
-		switch(object->getId()) {
+		switch (object->getId()) {
 		default:
 			break;
 
@@ -1586,7 +1586,7 @@ void Special::playSoundChapter6(Object *object, ActorIndex actorIndex) {
 	if (actorIndex != kActorInvalid)
 		return;
 
-	switch(object->getId()) {
+	switch (object->getId()) {
 	default:
 		break;
 
@@ -1631,7 +1631,7 @@ void Special::playSoundChapter7(Object *object, ActorIndex actorIndex) {
 	if (actorIndex != kActorInvalid)
 		return;
 
-	switch(object->getId()) {
+	switch (object->getId()) {
 	default:
 		break;
 
@@ -1650,7 +1650,7 @@ void Special::playSoundChapter7(Object *object, ActorIndex actorIndex) {
 
 void Special::playSoundChapter8(Object *object, ActorIndex actorIndex) {
 	if (actorIndex == kActorInvalid) {
-		switch(object->getId()) {
+		switch (object->getId()) {
 		default:
 			break;
 
diff --git a/engines/asylum/resources/special.h b/engines/asylum/resources/special.h
index 15a0cbaa47..cf621ce9cd 100644
--- a/engines/asylum/resources/special.h
+++ b/engines/asylum/resources/special.h
@@ -39,12 +39,12 @@ public:
 	Special(AsylumEngine *engine);
 	~Special() {};
 
-	void run(Object* object, ActorIndex index);
+	void run(Object *object, ActorIndex index);
 
 	void reset(bool resetPaletteTick2);
 
 private:
-	AsylumEngine* _vm;
+	AsylumEngine *_vm;
 
 	// Counters
 	int32 _chapter5Counter;
@@ -90,7 +90,7 @@ private:
 	void playSoundPanning(ResourceId resourceId, int32 attenuation, ActorIndex actorIndex);
 
 	void updateObjectFlag(ObjectId id);
-	void checkFlags(ObjectId id, GameFlag flag1, GameFlag flag2, GameFlag flag3, GameFlag flag4, uint32 *val1, uint32*val2, GameFlag flag5, uint32 *val3);
+	void checkFlags(ObjectId id, GameFlag flag1, GameFlag flag2, GameFlag flag3, GameFlag flag4, uint32 *val1, uint32 *val2, GameFlag flag5, uint32 *val3);
 
 	//////////////////////////////////////////////////////////////////////////
 	// Helpers
diff --git a/engines/asylum/resources/worldstats.cpp b/engines/asylum/resources/worldstats.cpp
index 9f8ed31fa7..f63f56c69e 100644
--- a/engines/asylum/resources/worldstats.cpp
+++ b/engines/asylum/resources/worldstats.cpp
@@ -531,7 +531,7 @@ int32 WorldStats::getRandomActionAreaIndexById(int32 id) {
 	return indexes[_vm->getRandom(count)];
 }
 
-ActionArea* WorldStats::getActionAreaById(int32 id) {
+ActionArea *WorldStats::getActionAreaById(int32 id) {
 	int index = getActionAreaIndexById(id);
 	if (index == -1)
 		error("[WorldStats::getActionAreaById] action id is invalid");
@@ -539,7 +539,7 @@ ActionArea* WorldStats::getActionAreaById(int32 id) {
 	return actions[index];
 }
 
-Object* WorldStats::getObjectById(ObjectId id) {
+Object *WorldStats::getObjectById(ObjectId id) {
 	for (uint32 i = 0; i < objects.size(); i++)
 		if (objects[i]->getId() == id)
 			return objects[i];
diff --git a/engines/asylum/resources/worldstats.h b/engines/asylum/resources/worldstats.h
index 1f03b783d6..1f07f26e47 100644
--- a/engines/asylum/resources/worldstats.h
+++ b/engines/asylum/resources/worldstats.h
@@ -119,8 +119,8 @@ public:
 	int32 musicFlag;
 	int32 musicResourceIndex;
 	int32 musicStatusExt;
-	Common::Array<Object*>     objects;   // maxsize 400
-	Common::Array<Actor*>      actors;   // maxsize 50
+	Common::Array<Object *> objects;   // maxsize 400
+	Common::Array<Actor *>  actors;    // maxsize  50
 	// ActorData is stored in each actor instance
 	uint32 numScripts;
 	uint32 numPolygons;
@@ -128,7 +128,7 @@ public:
 	ResourceId inventoryIconsNormal[16];
 	ResourceId inventoryCursorsNormal[16];
 	ResourceId inventoryCursorsBlinking[16];
-	Common::Array<ActionArea*> actions;  // maxsize 400
+	Common::Array<ActionArea *> actions;  // maxsize 400
 	int32 field_E848C;
 	int32 field_E8490;
 	int32 field_E8494;
@@ -150,9 +150,9 @@ public:
 
 	int32 getActionAreaIndexById(int32 id);
 	int32 getRandomActionAreaIndexById(int32 id);
-	ActionArea* getActionAreaById(int32 id);
+	ActionArea *getActionAreaById(int32 id);
 
-	Object* getObjectById(ObjectId id);
+	Object *getObjectById(ObjectId id);
 
 	Common::String toString();
 
diff --git a/engines/asylum/respack.h b/engines/asylum/respack.h
index 5fe4ae856b..0c2fbf8435 100644
--- a/engines/asylum/respack.h
+++ b/engines/asylum/respack.h
@@ -108,7 +108,7 @@ private:
 		uint operator()(const ResourcePackId &x) const { return x; }
 	};
 
-	typedef Common::HashMap<ResourcePackId, ResourcePack*, ResourcePackId_Hash, ResourcePackId_EqualTo> ResourceCache;
+	typedef Common::HashMap<ResourcePackId, ResourcePack *, ResourcePackId_Hash, ResourcePackId_EqualTo> ResourceCache;
 
 	ResourceCache _resources;
 	ResourceCache _music;
diff --git a/engines/asylum/system/config.cpp b/engines/asylum/system/config.cpp
index ecf2db0bbd..ed7d07f212 100644
--- a/engines/asylum/system/config.cpp
+++ b/engines/asylum/system/config.cpp
@@ -104,7 +104,7 @@ void ConfigurationManager::read() {
 	// Engine options
 	showEncounterSubtitles = ConfMan.getBool("show_encounter_subtitles");
 	gammaLevel    = ConfMan.getInt("gamma_level");
-	ambientVolume = ConfMan.getInt("ambient_volume");;
+	ambientVolume = ConfMan.getInt("ambient_volume");
 	movieVolume   = ConfMan.getInt("movie_volume");
 	musicStatus   = ConfMan.getBool("music_status");
 	reverseStereo = ConfMan.getBool("reverse_stereo");
diff --git a/engines/asylum/system/savegame.h b/engines/asylum/system/savegame.h
index 13098d5283..48c4c0f3af 100644
--- a/engines/asylum/system/savegame.h
+++ b/engines/asylum/system/savegame.h
@@ -188,7 +188,7 @@ public:
 	uint32 getBuild() { return _build; }
 
 private:
-	AsylumEngine* _vm;
+	AsylumEngine *_vm;
 
 	uint32 _index;
 	byte _moviesViewed[196];
diff --git a/engines/asylum/system/screen.cpp b/engines/asylum/system/screen.cpp
index 1596af3e4e..00ea83d728 100644
--- a/engines/asylum/system/screen.cpp
+++ b/engines/asylum/system/screen.cpp
@@ -648,7 +648,7 @@ void Screen::addGraphicToQueueMasked(ResourceId resourceId, uint32 frameIndex, c
 
 void Screen::addGraphicToQueueCrossfade(ResourceId resourceId, uint32 frameIndex, const Common::Point &point, int32 objectResourceId, const Common::Point &destination, uint32 transTableNum) {
 	// Save current transparency index
-	byte *transparencyIndex= _transTable;
+	byte *transparencyIndex = _transTable;
 	selectTransTable(transTableNum);
 
 	// Get graphic frames
@@ -1133,7 +1133,7 @@ void Screen::bltMasked(byte *srcBuffer, byte *maskBuffer, int16 height, int16 wi
 	}
 }
 
-void Screen::blt(Common::Rect *dest, GraphicFrame* frame, Common::Rect *source, int32 flags) {
+void Screen::blt(Common::Rect *dest, GraphicFrame *frame, Common::Rect *source, int32 flags) {
 	if (_useColorKey) {
 		copyToBackBufferWithTransparency((byte *)frame->surface.getPixels() + (source->top * frame->surface.w + source->left),
 		                                 frame->surface.w,
@@ -1153,7 +1153,7 @@ void Screen::blt(Common::Rect *dest, GraphicFrame* frame, Common::Rect *source,
 	}
 }
 
-void Screen::bltFast(int16 dX, int16 dY, GraphicFrame* frame, Common::Rect *source) {
+void Screen::bltFast(int16 dX, int16 dY, GraphicFrame *frame, Common::Rect *source) {
 	if (_useColorKey) {
 		copyToBackBufferWithTransparency((byte *)frame->surface.getPixels() + (source->top * frame->surface.w + source->left),
 		                                 frame->surface.w,
@@ -1236,7 +1236,7 @@ void Screen::copyToBackBufferClipped(Graphics::Surface *surface, int16 x, int16
 			startY = getWorld()->yTop;
 
 		_vm->screen()->copyToBackBufferWithTransparency(
-			((byte*)surface->getPixels()) +
+			((byte *)surface->getPixels()) +
 			startY * surface->pitch +
 			startX * surface->format.bytesPerPixel,
 			surface->pitch,
diff --git a/engines/asylum/system/screen.h b/engines/asylum/system/screen.h
index 1d8381768d..a623d2b4f9 100644
--- a/engines/asylum/system/screen.h
+++ b/engines/asylum/system/screen.h
@@ -79,7 +79,7 @@ public:
 	void draw(ResourceId resourceId);
 	void draw(ResourceId resourceId, uint32 frameIndex, const Common::Point &source, DrawFlags flags = kDrawFlagNone, bool colorKey = true);
 	void draw(ResourceId resourceId, uint32 frameIndex, const int16 (*srcPtr)[2], DrawFlags flags = kDrawFlagNone, bool colorKey = true);
-	void draw(GraphicResource *resource, uint32 frameIndex, const Common::Point &source, DrawFlags flags= kDrawFlagNone, bool colorKey = true);
+	void draw(GraphicResource *resource, uint32 frameIndex, const Common::Point &source, DrawFlags flags = kDrawFlagNone, bool colorKey = true);
 	void drawTransparent(ResourceId resourceId, uint32 frameIndex, const Common::Point &source, DrawFlags flags, uint32 transTableNum);
 	void drawTransparent(GraphicResource *resource, uint32 frameIndex, const Common::Point &source, DrawFlags flags, uint32 transTableNum);
 	void draw(ResourceId resourceId, uint32 frameIndex, const Common::Point &source, DrawFlags flags, ResourceId resourceId2, const Common::Point &destination, bool colorKey = true);
@@ -197,8 +197,8 @@ private:
 	void bltMasked             (byte *srcBuffer, byte *maskBuffer, int16 height, int16 width, uint16 srcPitch, uint16 maskPitch, byte zoom, byte *dstBuffer, uint16 dstPitch) const;
 
 	// DirectDraw-equivalent functions
-	void blt(Common::Rect *dest, GraphicFrame* frame, Common::Rect *source, int32 flags);
-	void bltFast(int16 dX, int16 dY, GraphicFrame* frame, Common::Rect *source);
+	void blt(Common::Rect *dest, GraphicFrame *frame, Common::Rect *source, int32 flags);
+	void bltFast(int16 dX, int16 dY, GraphicFrame *frame, Common::Rect *source);
 
 	void copyToBackBufferWithTransparency(byte *buffer, int32 pitch, int16 x, int16 y, uint16 width, uint16 height, bool mirrored = false);
 
diff --git a/engines/asylum/system/text.cpp b/engines/asylum/system/text.cpp
index 856207f138..cba691d1a8 100644
--- a/engines/asylum/system/text.cpp
+++ b/engines/asylum/system/text.cpp
@@ -116,9 +116,9 @@ int16 Text::getWidth(ResourceId resourceId) {
 	return getWidth(get(resourceId));
 }
 
-char* Text::get(ResourceId resourceId) {
+char *Text::get(ResourceId resourceId) {
 	ResourceEntry *textRes = getResource()->get(resourceId);
-	return (char*)textRes->data;
+	return (char *)textRes->data;
 }
 
 void Text::drawChar(char character) {
@@ -158,7 +158,7 @@ void Text::draw(const char *text, int16 length) {
 
 void Text::draw(ResourceId resourceId) {
 	ResourceEntry *textRes = getResource()->get(resourceId);
-	draw((char*)textRes->data);
+	draw((char *)textRes->data);
 }
 
 void Text::draw(const Common::Point &point, const char *text) {
diff --git a/engines/asylum/views/menu.cpp b/engines/asylum/views/menu.cpp
index 7f8ce1ce46..bf3aa5f218 100644
--- a/engines/asylum/views/menu.cpp
+++ b/engines/asylum/views/menu.cpp
@@ -1370,7 +1370,7 @@ void Menu::updateAudioOptions() {
 		getText()->setPosition(Common::Point(sizeMinus + 360, (int16)(29 * volumeIndex + 150)));
 		getText()->draw("+");
 
-		switch(volumeIndex) {
+		switch (volumeIndex) {
 		default:
 			break;
 
diff --git a/engines/asylum/views/scene.cpp b/engines/asylum/views/scene.cpp
index 1caa4a229d..3ee7dc77d7 100644
--- a/engines/asylum/views/scene.cpp
+++ b/engines/asylum/views/scene.cpp
@@ -257,7 +257,7 @@ void Scene::load(ResourcePackId packId) {
 	snprintf(filename, 10, SCENE_FILE_MASK, _packId);
 
 	char sceneTag[6];
-	Common::File* fd = new Common::File;
+	Common::File *fd = new Common::File;
 
 	if (!Common::File::exists(filename))
 		error("Scene file doesn't exist %s", filename);
@@ -2085,7 +2085,7 @@ void Scene::adjustCoordinates(Common::Point *point) {
 	point->y = _ws->yTop  + getCursor()->position().y;
 }
 
-Actor* Scene::getActor(ActorIndex index) {
+Actor *Scene::getActor(ActorIndex index) {
 	if (!_ws)
 		error("[Scene::getActor] WorldStats not initialized properly!");
 
diff --git a/engines/asylum/views/scene.h b/engines/asylum/views/scene.h
index 704e0359b3..a8a43f552b 100644
--- a/engines/asylum/views/scene.h
+++ b/engines/asylum/views/scene.h
@@ -121,7 +121,7 @@ public:
 	 * WorldStats actor list. Default parameter just
 	 * gets the instance associated with _playerActorIdx
 	 */
-	Actor* getActor(ActorIndex index = kActorInvalid);
+	Actor *getActor(ActorIndex index = kActorInvalid);
 
 	/**
 	 * Change player actor




More information about the Scummvm-git-logs mailing list