Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 9afa8f1

Browse files
committed
Remove weird operations with Vector and float
1 parent 9320a04 commit 9afa8f1

File tree

2 files changed

+1
-22
lines changed

2 files changed

+1
-22
lines changed

Entities/SLTerrain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1120,7 +1120,7 @@ void SLTerrain::ApplyMovableObject(MovableObject *pMObject)
11201120
pTempBitmap = m_spTempBitmap16;
11211121

11221122
// The position of the upper left corner of the temporary bitmap in the scene
1123-
Vector bitmapScroll = pMOSprite->GetPos().GetFloored() - (pTempBitmap->w / 2);
1123+
Vector bitmapScroll = pMOSprite->GetPos().GetFloored() - Vector(pTempBitmap->w / 2, pTempBitmap->w / 2);
11241124

11251125
Box notUsed;
11261126

System/Vector.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -370,13 +370,6 @@ namespace RTE {
370370
/// <returns>The resulting Vector.</returns>
371371
friend Vector operator+(const Vector &lhs, const Vector &rhs) { Vector returnVector(lhs.m_X + rhs.m_X, lhs.m_Y + rhs.m_Y); return returnVector; }
372372

373-
/// <summary>
374-
/// Subtraction operator overload for a Vector and a float.
375-
/// </summary>
376-
/// <param name="rhs">A float reference as the right hand side operand.</param>
377-
/// <returns>The resulting Vector.</returns>
378-
Vector operator-(const float &rhs) const { Vector returnVector(m_X - rhs, m_Y - rhs); return returnVector; }
379-
380373
/// <summary>
381374
/// Subtraction operator overload for Vectors.
382375
/// </summary>
@@ -423,13 +416,6 @@ namespace RTE {
423416
return returnVector;
424417
}
425418

426-
/// <summary>
427-
/// Self-addition operator overload for a Vector and a float.
428-
/// </summary>
429-
/// <param name="rhs">A float reference as the right hand side operand.</param>
430-
/// <returns>A reference to the resulting Vector.</returns>
431-
Vector & operator+=(const float &rhs) { m_X += rhs; m_Y += rhs; return *this; }
432-
433419
/// <summary>
434420
/// Self-addition operator overload for Vectors.
435421
/// </summary>
@@ -438,13 +424,6 @@ namespace RTE {
438424
/// <returns>A reference to the resulting Vector (the left one).</returns>
439425
friend Vector & operator+=(Vector &lhs, const Vector &rhs) { lhs.m_X += rhs.m_X; lhs.m_Y += rhs.m_Y; return lhs; }
440426

441-
/// <summary>
442-
/// Self-subtraction operator overload for a Vector and a float.
443-
/// </summary>
444-
/// <param name="rhs">A float reference as the right hand side operand.</param>
445-
/// <returns>A reference to the resulting Vector.</returns>
446-
Vector & operator-=(const float &rhs) { m_X -= rhs; m_Y -= rhs; return *this; }
447-
448427
/// <summary>
449428
/// Self-subtraction operator overload for Vectors.
450429
/// </summary>

0 commit comments

Comments
 (0)