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

mgerhardy martin.gerhardy at gmail.com
Thu Aug 26 07:24:41 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:
c416fe7830 TWINE: use forward decls and reduced header dependencies
d8d21057ef TWINE: fixed big endian issue with lba1 models


Commit: c416fe783017b99240966cfa6c290c813db86581
    https://github.com/scummvm/scummvm/commit/c416fe783017b99240966cfa6c290c813db86581
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-08-26T09:24:28+02:00

Commit Message:
TWINE: use forward decls and reduced header dependencies

Changed paths:
  A engines/twine/parser/bodytypes.h
    engines/twine/holomap.cpp
    engines/twine/holomap.h
    engines/twine/menu/menu.h
    engines/twine/parser/body.h
    engines/twine/renderer/redraw.cpp
    engines/twine/renderer/redraw.h
    engines/twine/renderer/renderer.h
    engines/twine/resources/resources.h
    engines/twine/scene/actor.h
    engines/twine/scene/animations.cpp
    engines/twine/scene/animations.h
    engines/twine/scene/collision.h
    engines/twine/scene/extra.h
    engines/twine/scene/gamestate.cpp
    engines/twine/scene/gamestate.h
    engines/twine/scene/grid.h
    engines/twine/scene/movements.h
    engines/twine/scene/scene.cpp
    engines/twine/scene/scene.h
    engines/twine/script/script_life_v1.cpp
    engines/twine/script/script_move_v1.cpp
    engines/twine/shared.h
    engines/twine/text.h
    engines/twine/twine.h


diff --git a/engines/twine/holomap.cpp b/engines/twine/holomap.cpp
index 84b3184f0e..e6871ac940 100644
--- a/engines/twine/holomap.cpp
+++ b/engines/twine/holomap.cpp
@@ -637,4 +637,9 @@ void Holomap::processHolomap() {
 	_engine->_text->initSceneTextBank();
 }
 
+const char *Holomap::getLocationName(int index) const {
+	assert(index >= 0 && index <= ARRAYSIZE(_locations));
+	return _locations[index].name;
+}
+
 } // namespace TwinE
diff --git a/engines/twine/holomap.h b/engines/twine/holomap.h
index 1aa5c6d4be..5b4f6d1bb2 100644
--- a/engines/twine/holomap.h
+++ b/engines/twine/holomap.h
@@ -23,15 +23,17 @@
 #ifndef TWINE_HOLOMAP_H
 #define TWINE_HOLOMAP_H
 
-#include "twine/renderer/renderer.h"
+#include "twine/shared.h"
 #include "common/scummsys.h"
-#include "twine/twine.h"
 
 namespace TwinE {
 
-#define NUM_LOCATIONS 150
-
 class TwinEEngine;
+class BodyData;
+class AnimData;
+struct ActorMoveStruct;
+struct Vertex;
+struct AnimTimerDataStruct;
 
 /**
  * The Holomap shows the hero position. The arrows (@c RESSHQR_HOLOARROWMDL) represent important places in your quest - they automatically disappear once that part of
@@ -124,11 +126,6 @@ public:
 	void processHolomap();
 };
 
-inline const char *Holomap::getLocationName(int index) const {
-	assert(index >= 0 && index <= ARRAYSIZE(_locations));
-	return _locations[index].name;
-}
-
 } // namespace TwinE
 
 #endif
diff --git a/engines/twine/menu/menu.h b/engines/twine/menu/menu.h
index 29736aa6f9..883e905070 100644
--- a/engines/twine/menu/menu.h
+++ b/engines/twine/menu/menu.h
@@ -23,7 +23,6 @@
 #ifndef TWINE_MENU_H
 #define TWINE_MENU_H
 
-#include "twine/scene/actor.h"
 #include "twine/twine.h"
 #include "twine/text.h"
 
@@ -34,6 +33,7 @@ namespace TwinE {
 #define PLASMA_HEIGHT 50
 #define kQuitEngine 9998
 
+class BodyData;
 class SpriteData;
 
 class MenuSettings {
diff --git a/engines/twine/parser/body.h b/engines/twine/parser/body.h
index d1d44e84b9..b8b517aba9 100644
--- a/engines/twine/parser/body.h
+++ b/engines/twine/parser/body.h
@@ -27,61 +27,12 @@
 #include "common/memstream.h"
 #include "common/stream.h"
 #include "twine/parser/anim.h"
+#include "twine/parser/bodytypes.h"
 #include "twine/parser/parser.h"
 #include "twine/shared.h"
 
 namespace TwinE {
 
-struct BodyVertex {
-	int16 x;
-	int16 y;
-	int16 z;
-	uint16 bone;
-};
-
-struct BodyBone {
-	uint16 parent;
-	uint16 vertex;
-	int16 firstVertex;
-	int16 numVertices;
-	int32 numOfShades;
-	BoneFrame initalBoneState;
-
-	inline bool isRoot() const {
-		return parent == 0xffff;
-	}
-};
-
-struct BodyShade {
-	int16 col1;
-	int16 col2;
-	int16 col3;
-	uint16 unk4;
-};
-
-struct BodyPolygon {
-	Common::Array<uint16> indices;
-	Common::Array<uint16> intensities;
-	int8 renderType = 0;
-	int16 color = 0;
-};
-
-struct BodyLine {
-	uint8 color;
-	uint8 unk1;
-	uint16 unk2;
-	uint16 vertex1;
-	uint16 vertex2;
-};
-
-struct BodySphere {
-	uint8 unk1;
-	uint8 color;
-	uint16 unk2;
-	uint16 radius;
-	uint16 vertex;
-};
-
 class BodyData : public Parser {
 private:
 	void loadVertices(Common::SeekableReadStream &stream);
diff --git a/engines/twine/parser/bodytypes.h b/engines/twine/parser/bodytypes.h
new file mode 100644
index 0000000000..8032c75f5e
--- /dev/null
+++ b/engines/twine/parser/bodytypes.h
@@ -0,0 +1,84 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef TWINE_PARSER_BODYTYPES_H
+#define TWINE_PARSER_BODYTYPES_H
+
+#include "common/array.h"
+#include "twine/shared.h"
+#include "twine/parser/anim.h"
+
+namespace TwinE {
+
+struct BodyVertex {
+	int16 x;
+	int16 y;
+	int16 z;
+	uint16 bone;
+};
+
+struct BodyLine {
+	uint8 color;
+	uint8 unk1;
+	uint16 unk2;
+	uint16 vertex1;
+	uint16 vertex2;
+};
+
+struct BodySphere {
+	uint8 unk1;
+	uint8 color;
+	uint16 unk2;
+	uint16 radius;
+	uint16 vertex;
+};
+
+struct BodyBone {
+	uint16 parent;
+	uint16 vertex;
+	int16 firstVertex;
+	int16 numVertices;
+	int32 numOfShades;
+	BoneFrame initalBoneState;
+
+	inline bool isRoot() const {
+		return parent == 0xffff;
+	}
+};
+
+struct BodyShade {
+	int16 col1;
+	int16 col2;
+	int16 col3;
+	uint16 unk4;
+};
+
+struct BodyPolygon {
+	Common::Array<uint16> indices;
+	Common::Array<uint16> intensities;
+	int8 renderType = 0;
+	int16 color = 0;
+};
+
+}
+
+#endif
diff --git a/engines/twine/renderer/redraw.cpp b/engines/twine/renderer/redraw.cpp
index 1efa33dd29..6d108bc746 100644
--- a/engines/twine/renderer/redraw.cpp
+++ b/engines/twine/renderer/redraw.cpp
@@ -39,6 +39,7 @@
 #include "twine/scene/actor.h"
 #include "twine/scene/animations.h"
 #include "twine/scene/collision.h"
+#include "twine/scene/extra.h"
 #include "twine/scene/grid.h"
 #include "twine/scene/movements.h"
 #include "twine/scene/scene.h"
@@ -47,6 +48,8 @@
 
 namespace TwinE {
 
+Redraw::Redraw(TwinEEngine *engine) : _engine(engine), _bubbleSpriteIndex(SPRITEHQR_DIAG_BUBBLE_LEFT) {}
+
 void Redraw::addRedrawCurrentArea(const Common::Rect &redrawArea) {
 	const int32 area = (redrawArea.right - redrawArea.left) * (redrawArea.bottom - redrawArea.top);
 
diff --git a/engines/twine/renderer/redraw.h b/engines/twine/renderer/redraw.h
index 80cfde09b9..1ca7a43a7d 100644
--- a/engines/twine/renderer/redraw.h
+++ b/engines/twine/renderer/redraw.h
@@ -25,7 +25,7 @@
 
 #include "common/scummsys.h"
 #include "common/rect.h"
-#include "twine/resources/resources.h"
+#include "twine/shared.h"
 
 namespace TwinE {
 
@@ -97,7 +97,7 @@ private:
 
 	/** Save last actor that bubble dialog icon */
 	int32 _bubbleActor = -1;
-	int32 _bubbleSpriteIndex = SPRITEHQR_DIAG_BUBBLE_LEFT;
+	int32 _bubbleSpriteIndex;
 
 	IVec3 _projPosScreen;
 
@@ -124,7 +124,7 @@ private:
 	void renderOverlays();
 
 public:
-	Redraw(TwinEEngine *engine) : _engine(engine) {}
+	Redraw(TwinEEngine *engine);
 
 	bool _inSceneryView = false;
 
diff --git a/engines/twine/renderer/renderer.h b/engines/twine/renderer/renderer.h
index 8989d0df0b..ade786b16f 100644
--- a/engines/twine/renderer/renderer.h
+++ b/engines/twine/renderer/renderer.h
@@ -26,7 +26,7 @@
 #include "common/endian.h"
 #include "common/rect.h"
 #include "common/scummsys.h"
-#include "twine/parser/body.h"
+#include "twine/parser/bodytypes.h"
 #include "twine/twine.h"
 
 #define POLYGONTYPE_FLAT 0
@@ -43,6 +43,7 @@
 
 namespace TwinE {
 
+class BodyData;
 class TwinEEngine;
 
 struct Vertex {
diff --git a/engines/twine/resources/resources.h b/engines/twine/resources/resources.h
index d18b91091e..bec9bf9717 100644
--- a/engines/twine/resources/resources.h
+++ b/engines/twine/resources/resources.h
@@ -25,6 +25,7 @@
 
 #include "common/hashmap.h"
 #include "common/scummsys.h"
+#include "twine/parser/body.h"
 #include "twine/parser/holomap.h"
 #include "twine/parser/sprite.h"
 #include "twine/parser/text.h"
diff --git a/engines/twine/scene/actor.h b/engines/twine/scene/actor.h
index 6bc3167c15..feacdf5c8c 100644
--- a/engines/twine/scene/actor.h
+++ b/engines/twine/scene/actor.h
@@ -25,10 +25,8 @@
 
 #include "common/scummsys.h"
 #include "twine/parser/anim.h"
-#include "twine/parser/body.h"
 #include "twine/parser/entity.h"
 #include "twine/shared.h"
-#include "twine/text.h"
 
 namespace TwinE {
 
@@ -134,19 +132,6 @@ struct BonusParameter {
 	uint16 unused : 7;
 };
 
-enum class AnimType {
-	kAnimationTypeLoop = 0,
-	kAnimationType_1 = 1,
-	// play animation and let animExtra follow as next animation
-	// if there is already a next animation set - replace the value
-	kAnimationType_2 = 2,
-	// replace animation and let the current animation follow
-	kAnimationType_3 = 3,
-	// play animation and let animExtra follow as next animation
-	// but don't take the current state in account
-	kAnimationType_4 = 4
-};
-
 #define kActorMaxLife 50
 
 /**
diff --git a/engines/twine/scene/animations.cpp b/engines/twine/scene/animations.cpp
index 6fd7c20ee3..52377a68df 100644
--- a/engines/twine/scene/animations.cpp
+++ b/engines/twine/scene/animations.cpp
@@ -24,22 +24,19 @@
 #include "common/endian.h"
 #include "common/memstream.h"
 #include "common/stream.h"
-#include "common/system.h"
-#include "common/textconsole.h"
 #include "common/util.h"
 #include "twine/audio/sound.h"
 #include "twine/parser/anim.h"
 #include "twine/parser/entity.h"
 #include "twine/renderer/renderer.h"
 #include "twine/resources/resources.h"
-#include "twine/scene/actor.h"
 #include "twine/scene/collision.h"
+#include "twine/scene/extra.h"
 #include "twine/scene/gamestate.h"
 #include "twine/scene/grid.h"
 #include "twine/scene/movements.h"
 #include "twine/scene/scene.h"
 #include "twine/shared.h"
-#include "twine/twine.h"
 
 namespace TwinE {
 
diff --git a/engines/twine/scene/animations.h b/engines/twine/scene/animations.h
index f86846db98..76ac099f75 100644
--- a/engines/twine/scene/animations.h
+++ b/engines/twine/scene/animations.h
@@ -24,11 +24,12 @@
 #define TWINE_SCENE_ANIMATIONS_H
 
 #include "common/scummsys.h"
-#include "twine/scene/actor.h"
-#include "twine/scene/scene.h"
+#include "twine/parser/anim.h"
 
 namespace TwinE {
 
+struct AnimTimerDataStruct;
+class BodyData;
 class TwinEEngine;
 
 class Animations {
diff --git a/engines/twine/scene/collision.h b/engines/twine/scene/collision.h
index 653a91bf22..4585f9bfc2 100644
--- a/engines/twine/scene/collision.h
+++ b/engines/twine/scene/collision.h
@@ -24,10 +24,12 @@
 #define TWINE_SCENE_COLLISION_H
 
 #include "common/scummsys.h"
-#include "twine/scene/extra.h"
+#include "twine/shared.h"
 
 namespace TwinE {
 
+class ActorStruct;
+class ExtraListStruct;
 class TwinEEngine;
 
 class Collision {
diff --git a/engines/twine/scene/extra.h b/engines/twine/scene/extra.h
index 41aede8e25..960b5a5be6 100644
--- a/engines/twine/scene/extra.h
+++ b/engines/twine/scene/extra.h
@@ -24,6 +24,7 @@
 #define TWINE_SCENE_EXTRA_H
 
 #include "common/scummsys.h"
+#include "common/rect.h"
 #include "twine/scene/actor.h"
 
 namespace TwinE {
diff --git a/engines/twine/scene/gamestate.cpp b/engines/twine/scene/gamestate.cpp
index 1bc12c049d..fc2cecd4e7 100644
--- a/engines/twine/scene/gamestate.cpp
+++ b/engines/twine/scene/gamestate.cpp
@@ -619,4 +619,14 @@ void GameState::addLeafBoxes(int16 val) {
 	setLeafBoxes(_inventoryNumLeafsBox + val);
 }
 
+void GameState::clearGameFlags() {
+	debug(2, "Clear all gameStateFlags");
+	Common::fill(&_gameStateFlags[0], &_gameStateFlags[NUM_GAME_FLAGS], 0);
+}
+
+uint8 GameState::hasGameFlag(uint8 index) const {
+	debug(6, "Query gameStateFlags[%u]=%u", index, _gameStateFlags[index]);
+	return _gameStateFlags[index];
+}
+
 } // namespace TwinE
diff --git a/engines/twine/scene/gamestate.h b/engines/twine/scene/gamestate.h
index 8bc4fb7d85..797b046b74 100644
--- a/engines/twine/scene/gamestate.h
+++ b/engines/twine/scene/gamestate.h
@@ -25,10 +25,7 @@
 
 #include "common/savefile.h"
 #include "common/scummsys.h"
-#include "common/util.h"
-#include "twine/holomap.h"
 #include "twine/menu/menu.h"
-#include "twine/scene/actor.h"
 
 namespace TwinE {
 
@@ -163,15 +160,9 @@ public:
 		setGameFlag(item, 0);
 	}
 
-	void clearGameFlags() {
-		debug(2, "Clear all gameStateFlags");
-		Common::fill(&_gameStateFlags[0], &_gameStateFlags[NUM_GAME_FLAGS], 0);
-	}
+	void clearGameFlags();
 
-	inline uint8 hasGameFlag(uint8 index) const {
-		debug(6, "Query gameStateFlags[%u]=%u", index, _gameStateFlags[index]);
-		return _gameStateFlags[index];
-	}
+	uint8 hasGameFlag(uint8 index) const;
 
 	void setGameFlag(uint8 index, uint8 value);
 
diff --git a/engines/twine/scene/grid.h b/engines/twine/scene/grid.h
index fbb632d20a..b2791d2239 100644
--- a/engines/twine/scene/grid.h
+++ b/engines/twine/scene/grid.h
@@ -27,7 +27,6 @@
 #include "twine/parser/blocklibrary.h"
 #include "twine/parser/sprite.h"
 #include "twine/shared.h"
-#include "twine/twine.h"
 
 namespace Graphics {
 class ManagedSurface;
@@ -35,6 +34,8 @@ class ManagedSurface;
 
 namespace TwinE {
 
+struct ActorStruct;
+
 /** Block fragment entry */
 struct BlockEntry {
 	/** Block library index */
diff --git a/engines/twine/scene/movements.h b/engines/twine/scene/movements.h
index 0a664361a9..3173157687 100644
--- a/engines/twine/scene/movements.h
+++ b/engines/twine/scene/movements.h
@@ -24,11 +24,13 @@
 #define TWINE_SCENE_MOVEMENTS_H
 
 #include "common/scummsys.h"
-#include "twine/scene/actor.h"
+#include "twine/shared.h"
 
 namespace TwinE {
 
 class TwinEEngine;
+struct ActorStruct;
+struct ActorMoveStruct;
 
 class Movements {
 private:
diff --git a/engines/twine/scene/scene.cpp b/engines/twine/scene/scene.cpp
index 7464f0512a..57ab187e93 100644
--- a/engines/twine/scene/scene.cpp
+++ b/engines/twine/scene/scene.cpp
@@ -28,6 +28,7 @@
 #include "twine/audio/sound.h"
 #include "twine/debugger/debug_grid.h"
 #include "twine/debugger/debug_scene.h"
+#include "twine/holomap.h"
 #include "twine/renderer/redraw.h"
 #include "twine/renderer/renderer.h"
 #include "twine/renderer/screens.h"
diff --git a/engines/twine/scene/scene.h b/engines/twine/scene/scene.h
index cd619687dc..bea8be8e8c 100644
--- a/engines/twine/scene/scene.h
+++ b/engines/twine/scene/scene.h
@@ -100,9 +100,6 @@ struct ZoneStruct {
 	} infoData;
 };
 
-#define OWN_ACTOR_SCENE_INDEX 0
-#define IS_HERO(x) (x) == OWN_ACTOR_SCENE_INDEX
-
 class TwinEEngine;
 
 /**
diff --git a/engines/twine/script/script_life_v1.cpp b/engines/twine/script/script_life_v1.cpp
index 62d3d35389..870f7309fc 100644
--- a/engines/twine/script/script_life_v1.cpp
+++ b/engines/twine/script/script_life_v1.cpp
@@ -40,6 +40,7 @@
 #include "twine/renderer/renderer.h"
 #include "twine/renderer/screens.h"
 #include "twine/resources/resources.h"
+#include "twine/scene/extra.h"
 #include "twine/scene/scene.h"
 #include "twine/shared.h"
 #include "twine/text.h"
diff --git a/engines/twine/script/script_move_v1.cpp b/engines/twine/script/script_move_v1.cpp
index 8caa3a76c5..7f187490fb 100644
--- a/engines/twine/script/script_move_v1.cpp
+++ b/engines/twine/script/script_move_v1.cpp
@@ -24,7 +24,6 @@
 #include "common/memstream.h"
 #include "common/textconsole.h"
 #include "common/util.h"
-#include "twine/scene/actor.h"
 #include "twine/scene/animations.h"
 #include "twine/audio/sound.h"
 #include "twine/flamovies.h"
diff --git a/engines/twine/shared.h b/engines/twine/shared.h
index dd36b584b5..5bcbcfc792 100644
--- a/engines/twine/shared.h
+++ b/engines/twine/shared.h
@@ -26,6 +26,12 @@
 #include "common/scummsys.h"
 
 #define NUM_GAME_FLAGS 255
+
+/** Number of colors used in the game */
+#define NUMOFCOLORS 256
+
+#define NUM_LOCATIONS 150
+
 #define NUM_INVENTORY_ITEMS 28
 /**
  * This gameflag indicates that the inventory items are taken from Twinson because he went to jail
@@ -72,6 +78,9 @@
 // Twinsun explosion
 #define GAMEFLAG_VIDEO_EXPLODE2 219
 
+#define OWN_ACTOR_SCENE_INDEX 0
+#define IS_HERO(x) (x) == OWN_ACTOR_SCENE_INDEX
+
 namespace TwinE {
 
 #include "common/pack-start.h"
@@ -251,6 +260,19 @@ enum class AnimationTypes {
 	kAnimInvalid = 255
 };
 
+enum class AnimType {
+	kAnimationTypeLoop = 0,
+	kAnimationType_1 = 1,
+	// play animation and let animExtra follow as next animation
+	// if there is already a next animation set - replace the value
+	kAnimationType_2 = 2,
+	// replace animation and let the current animation follow
+	kAnimationType_3 = 3,
+	// play animation and let animExtra follow as next animation
+	// but don't take the current state in account
+	kAnimationType_4 = 4
+};
+
 /** Hero behaviour
  * <li> NORMAL: Talk / Read / Search / Use
  * <li> ATHLETIC: Jump
@@ -607,6 +629,32 @@ inline constexpr T bits(T value, uint8 offset, uint8 bits) {
 	return (((1 << bits) - 1) & (value >> offset));
 }
 
+#define COLOR_BLACK 0
+#define COLOR_BRIGHT_BLUE 4
+#define COLOR_9 9
+#define COLOR_14 14
+// color 1 = yellow
+// color 2 - 15 = white
+// color 16 - 19 = brown
+// color 20 - 24 = orange to yellow
+// color 25 orange
+// color 26 - 30 = bright gray or white
+#define COlOR_31 31 // green dark
+#define COlOR_47 47 // green bright
+#define COLOR_48 48 // brown dark
+#define COLOR_63 63 // brown bright
+#define COLOR_64 64 // blue dark
+#define COLOR_68 68 // blue
+#define COLOR_73 73 // blue
+#define COLOR_75 75
+#define COLOR_79 79 // blue bright
+#define COLOR_80 80
+#define COLOR_91 91
+#define COLOR_BRIGHT_BLUE2 69
+#define COLOR_WHITE 15
+#define COLOR_GOLD 155
+#define COLOR_158 158
+
 }
 
 #endif
diff --git a/engines/twine/text.h b/engines/twine/text.h
index eaa3439960..17c999b072 100644
--- a/engines/twine/text.h
+++ b/engines/twine/text.h
@@ -34,32 +34,6 @@ class TextEntry;
 
 #define TEXT_MAX_FADE_IN_CHR 32
 
-#define COLOR_BLACK 0
-#define COLOR_BRIGHT_BLUE 4
-#define COLOR_9 9
-#define COLOR_14 14
-// color 1 = yellow
-// color 2 - 15 = white
-// color 16 - 19 = brown
-// color 20 - 24 = orange to yellow
-// color 25 orange
-// color 26 - 30 = bright gray or white
-#define COlOR_31 31 // green dark
-#define COlOR_47 47 // green bright
-#define COLOR_48 48 // brown dark
-#define COLOR_63 63 // brown bright
-#define COLOR_64 64 // blue dark
-#define COLOR_68 68 // blue
-#define COLOR_73 73 // blue
-#define COLOR_75 75
-#define COLOR_79 79 // blue bright
-#define COLOR_80 80
-#define COLOR_91 91
-#define COLOR_BRIGHT_BLUE2 69
-#define COLOR_WHITE 15
-#define COLOR_GOLD 155
-#define COLOR_158 158
-
 enum class ProgressiveTextState {
 	End = 0,				/**< Text has reached its end and we are waiting for user input */
 	ContinueRunning = 1,	/**< Text is fading in */
diff --git a/engines/twine/twine.h b/engines/twine/twine.h
index 1884039657..643acc1992 100644
--- a/engines/twine/twine.h
+++ b/engines/twine/twine.h
@@ -50,9 +50,6 @@ namespace TwinE {
 /** Default frames per second */
 #define DEFAULT_FRAMES_PER_SECOND 20
 
-/** Number of colors used in the game */
-#define NUMOFCOLORS 256
-
 #define ORIGINAL_WIDTH 640
 #define ORIGINAL_HEIGHT 480
 


Commit: d8d21057ef8b6bd01a9cd9b2f029943aa53c5015
    https://github.com/scummvm/scummvm/commit/d8d21057ef8b6bd01a9cd9b2f029943aa53c5015
Author: Martin Gerhardy (martin.gerhardy at gmail.com)
Date: 2021-08-26T09:24:28+02:00

Commit Message:
TWINE: fixed big endian issue with lba1 models

Changed paths:
    engines/twine/parser/body.h


diff --git a/engines/twine/parser/body.h b/engines/twine/parser/body.h
index b8b517aba9..0fca681557 100644
--- a/engines/twine/parser/body.h
+++ b/engines/twine/parser/body.h
@@ -81,7 +81,7 @@ public:
 	int16 offsetToData = 0;
 
 	inline bool isAnimated() const {
-		return bodyFlag.mask.animated;
+		return (bodyFlag.value & 2) != 0;
 	}
 
 	inline uint getNumBones() const {




More information about the Scummvm-git-logs mailing list