diff --git a/src/common/cutscenes/playmve.cpp b/src/common/cutscenes/playmve.cpp
index 403daa531a..70b56b43a1 100644
--- a/src/common/cutscenes/playmve.cpp
+++ b/src/common/cutscenes/playmve.cpp
@@ -126,7 +126,7 @@ bool InterplayDecoder::FillSamples(void *buff, int len)
         audio.Packets.pop_front();
         plock.unlock();
 
-        int nSamples = pkt.nSize;
+        int nSamples = (int)pkt.nSize;
         const uint8_t *samplePtr = pkt.pData.get();
         if (audio.bCompressed)
         {
@@ -153,7 +153,7 @@ bool InterplayDecoder::FillSamples(void *buff, int len)
                 audio.samples[audio.nWrite++] = predictor[ch];
 
                 // toggle channel
-                ch ^= stereo;
+                ch ^= stereo ? 1 : 0;
             }
         }
         else if (audio.nBitDepth == 8)
diff --git a/src/common/thirdparty/libsmackerdec/src/SmackerDecoder.cpp b/src/common/thirdparty/libsmackerdec/src/SmackerDecoder.cpp
index 57eb4bd15a..ff69f3b2c2 100644
--- a/src/common/thirdparty/libsmackerdec/src/SmackerDecoder.cpp
+++ b/src/common/thirdparty/libsmackerdec/src/SmackerDecoder.cpp
@@ -732,7 +732,7 @@ void SmackerDecoder::GetNextFrame()
 	framePacketData.pop_front();
 	flock.unlock();
 
-	uint32_t frameSize = pkt.size;
+	uint32_t frameSize = (uint32_t)pkt.size;
 	uint8_t frameFlag  = frameFlags[currentFrame];
 
 	const uint8_t *packetDataPtr = pkt.data.get();
@@ -1235,7 +1235,7 @@ uint32_t SmackerDecoder::GetAudioData(uint32_t trackIndex, int16_t *audioBuffer)
 	track->bytesReadThisFrame = 0;
 
 	const uint8_t *packetDataPtr = pkt.data.get();
-	uint32_t size = pkt.size;
+	uint32_t size = (uint32_t)pkt.size;
 
 	DecodeAudio(packetDataPtr, size, *track);
 
diff --git a/src/common/utility/vectors.h b/src/common/utility/vectors.h
index 073c946c76..017d1a5209 100644
--- a/src/common/utility/vectors.h
+++ b/src/common/utility/vectors.h
@@ -577,7 +577,7 @@ struct TVector3
 		}
 
 		up = n ^right;
-		right.MakeUnit();;
+		right.MakeUnit();
 		up.MakeUnit();
 	}
 
@@ -665,6 +665,7 @@ struct TVector3
 template<class vec_t>
 struct TVector4
 {
+	typedef TVector2<vec_t> Vector2;
 	typedef TVector3<vec_t> Vector3;
 
 	vec_t X, Y, Z, W;
@@ -723,6 +724,29 @@ struct TVector4
 		return X != other.X || Y != other.Y || Z != other.Z || W != other.W;
 	}
 
+	// returns the XY fields as a 2D-vector.
+	const Vector2& XY() const
+	{
+		return *reinterpret_cast<const Vector2*>(this);
+	}
+
+	Vector2& XY()
+	{
+		return *reinterpret_cast<Vector2*>(this);
+	}
+
+	// returns the XY fields as a 2D-vector.
+	const Vector3& XYZ() const
+	{
+		return *reinterpret_cast<const Vector3*>(this);
+	}
+
+	Vector3& XYZ()
+	{
+		return *reinterpret_cast<Vector3*>(this);
+	}
+
+
 	// Test for approximate equality
 	bool ApproximatelyEquals(const TVector4 &other) const
 	{
@@ -838,12 +862,6 @@ struct TVector4
 		return *this;
 	}
 
-	// returns the XYZ fields as a 3D-vector.
-	Vector3 XYZ() const
-	{
-		return{ X, Y, Z };
-	}
-
 	// Add a 4D vector and a 3D vector.
 	friend TVector4 operator+ (const TVector4 &v4, const Vector3 &v3)
 	{