[Scummvm-git-logs] scummvm master -> 0b00ff2b6fe225f07bfa59778b53a2f6c58662a1

bluegr noreply at scummvm.org
Sat Aug 10 19:51:59 UTC 2024


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:
0b00ff2b6f JANITORIAL: HPL1: Fix typos in code


Commit: 0b00ff2b6fe225f07bfa59778b53a2f6c58662a1
    https://github.com/scummvm/scummvm/commit/0b00ff2b6fe225f07bfa59778b53a2f6c58662a1
Author: Hubert Maier (raziel- at users.noreply.github.com)
Date: 2024-08-10T22:51:56+03:00

Commit Message:
JANITORIAL: HPL1: Fix typos in code

Changed paths:
    engines/hpl1/engine/graphics/LowLevelGraphics.h
    engines/hpl1/engine/impl/LowLevelGraphicsSDL.cpp
    engines/hpl1/engine/impl/MeshLoaderCollada.cpp
    engines/hpl1/engine/impl/low_level_graphics_tgl.cpp
    engines/hpl1/engine/math/Math.cpp
    engines/hpl1/engine/resources/FontManager.cpp
    engines/hpl1/engine/scene/MeshEntity.cpp
    engines/hpl1/penumbra-overture/GameEnemy_Worm.cpp
    engines/hpl1/penumbra-overture/GameEnemy_Worm.h
    engines/hpl1/penumbra-overture/GameEntity.cpp
    engines/hpl1/penumbra-overture/GameTypes.h
    engines/hpl1/penumbra-overture/HudModel_Weapon.cpp
    engines/hpl1/penumbra-overture/PlayerHands.cpp
    engines/hpl1/penumbra-overture/PlayerHands.h


diff --git a/engines/hpl1/engine/graphics/LowLevelGraphics.h b/engines/hpl1/engine/graphics/LowLevelGraphics.h
index 3738d34c69e..5684d1d1f61 100644
--- a/engines/hpl1/engine/graphics/LowLevelGraphics.h
+++ b/engines/hpl1/engine/graphics/LowLevelGraphics.h
@@ -93,7 +93,7 @@ enum eTextureFunc {
 	eTextureFunc_Modulate,
 	eTextureFunc_Replace,
 	eTextureFunc_Add,
-	eTextureFunc_Substract,
+	eTextureFunc_Subtract,
 	eTextureFunc_AddSigned,
 	eTextureFunc_Interpolate,
 	eTextureFunc_Dot3RGB,
diff --git a/engines/hpl1/engine/impl/LowLevelGraphicsSDL.cpp b/engines/hpl1/engine/impl/LowLevelGraphicsSDL.cpp
index 5c16e394bbc..d592b59ac8a 100644
--- a/engines/hpl1/engine/impl/LowLevelGraphicsSDL.cpp
+++ b/engines/hpl1/engine/impl/LowLevelGraphicsSDL.cpp
@@ -1665,7 +1665,7 @@ GLenum cLowLevelGraphicsSDL::GetGLTextureFuncEnum(eTextureFunc type) {
 		return GL_REPLACE;
 	case eTextureFunc_Add:
 		return GL_ADD;
-	case eTextureFunc_Substract:
+	case eTextureFunc_Subtract:
 		return GL_SUBTRACT;
 	case eTextureFunc_AddSigned:
 		return GL_ADD_SIGNED;
diff --git a/engines/hpl1/engine/impl/MeshLoaderCollada.cpp b/engines/hpl1/engine/impl/MeshLoaderCollada.cpp
index f05705dea65..71d5c704177 100644
--- a/engines/hpl1/engine/impl/MeshLoaderCollada.cpp
+++ b/engines/hpl1/engine/impl/MeshLoaderCollada.cpp
@@ -214,7 +214,7 @@ static cColladaNode *GetNodeFromController(const tString &asGeomId,
 				asGeomId.c_str(), sControlId.c_str());
 
 	if (sControlId == "") {
-		Warning("No controller refered to the geometry!\n");
+		Warning("No controller referred to the geometry!\n");
 		return NULL;
 	}
 
diff --git a/engines/hpl1/engine/impl/low_level_graphics_tgl.cpp b/engines/hpl1/engine/impl/low_level_graphics_tgl.cpp
index d40e44f1172..e79d14a6faa 100644
--- a/engines/hpl1/engine/impl/low_level_graphics_tgl.cpp
+++ b/engines/hpl1/engine/impl/low_level_graphics_tgl.cpp
@@ -166,7 +166,7 @@ TGLenum GetGLTextureFuncEnum(eTextureFunc type) {
 	case eTextureFunc_Add:
 		return TGL_ADD;
 
-	case eTextureFunc_Substract:
+	case eTextureFunc_Subtract:
 	case eTextureFunc_AddSigned:
 	case eTextureFunc_Interpolate:
 	case eTextureFunc_Dot3RGB:
diff --git a/engines/hpl1/engine/math/Math.cpp b/engines/hpl1/engine/math/Math.cpp
index a6577ad3196..d32eed0ec6d 100644
--- a/engines/hpl1/engine/math/Math.cpp
+++ b/engines/hpl1/engine/math/Math.cpp
@@ -1488,7 +1488,7 @@ bool cMath::CreateEdges(tTriEdgeVec &avEdges,
 		// If vertex already exist just add the index
 		if (it != mapVtxIndices.end()) {
 			if (bLog)
-				Log("Allready added, appending.!\n");
+				Log("Already added, appending.!\n");
 			it->second.mlstIndices.push_back(idx);
 		}
 		// if vertex is not added create new vertex and add.
diff --git a/engines/hpl1/engine/resources/FontManager.cpp b/engines/hpl1/engine/resources/FontManager.cpp
index f7bb05c16ba..ef0b936e226 100644
--- a/engines/hpl1/engine/resources/FontManager.cpp
+++ b/engines/hpl1/engine/resources/FontManager.cpp
@@ -98,7 +98,7 @@ FontData *cFontManager::CreateFontData(const tString &asName, int alSize, unsign
 				return NULL;
 			}
 		} else {
-			Error("Font '%s' has an unkown extension!\n", asName.c_str());
+			Error("Font '%s' has an unknown extension!\n", asName.c_str());
 			hplDelete(pFont);
 			EndLoad();
 			return NULL;
diff --git a/engines/hpl1/engine/scene/MeshEntity.cpp b/engines/hpl1/engine/scene/MeshEntity.cpp
index 5902e69ae8e..b6c829240b4 100644
--- a/engines/hpl1/engine/scene/MeshEntity.cpp
+++ b/engines/hpl1/engine/scene/MeshEntity.cpp
@@ -353,7 +353,7 @@ cMeshEntity::cMeshEntity(const tString asName, cMesh *apMesh, cMaterialManager *
 cMeshEntity::~cMeshEntity() {
 	for (tEntity3DListIt it = mlstAttachedEntities.begin(); it != mlstAttachedEntities.end(); ++it) {
 		// iEntity3D *pEntity = *it;
-		//  TODO: if(mpWorld) mpWorld->DestroyUnkownEntity(pEntity);
+		//  TODO: if(mpWorld) mpWorld->DestroyUnknownEntity(pEntity);
 	}
 
 	for (int i = 0; i < (int)mvSubMeshes.size(); i++) {
diff --git a/engines/hpl1/penumbra-overture/GameEnemy_Worm.cpp b/engines/hpl1/penumbra-overture/GameEnemy_Worm.cpp
index a93dd99ac4e..3b4de5a3e7c 100644
--- a/engines/hpl1/penumbra-overture/GameEnemy_Worm.cpp
+++ b/engines/hpl1/penumbra-overture/GameEnemy_Worm.cpp
@@ -472,7 +472,7 @@ cGameEnemy_Worm::cGameEnemy_Worm(cInit *apInit, const tString &asName, TiXmlElem
 	// Internal variables
 	mvLastForward = cVector3f(0, 0, 1);
 
-	mlMaxSegmentPostions = 20;
+	mlMaxSegmentPositions = 20;
 	mfTurnSpeed = cMath::ToRad(160.0f);
 }
 
@@ -563,7 +563,7 @@ void cGameEnemy_Worm_MeshCallback::AfterAnimationUpdate(cMeshEntity *apMeshEntit
 
 		////////////////////////////////////////
 		// Set world matrix of bone
-		mtxTrans.SetTranslation(pSegment->mvPostion);
+		mtxTrans.SetTranslation(pSegment->mvPosition);
 		pSegment->mpBone->SetWorldMatrix(mtxTrans);
 	}
 }
@@ -675,7 +675,7 @@ void cGameEnemy_Worm::OnUpdate(float afTimeStep) {
 	} else
 		mlstRootPositions.push_back(pCharBody->GetPosition());
 
-	if ((int)mlstRootPositions.size() > mlMaxSegmentPostions)
+	if ((int)mlstRootPositions.size() > mlMaxSegmentPositions)
 		mlstRootPositions.pop_front();
 
 	// Get smooth position
@@ -739,25 +739,25 @@ void cGameEnemy_Worm::OnUpdate(float afTimeStep) {
 		// Change position of segment
 
 		// Get add newer pos and smooth all the previous
-		cVector3f vPrevPos = pSegment->mvPostion;
+		cVector3f vPrevPos = pSegment->mvPosition;
 		pSegment->mlstPositions.push_back(vSegBackPos);
-		if ((int)pSegment->mlstPositions.size() > mlMaxSegmentPostions) {
+		if ((int)pSegment->mlstPositions.size() > mlMaxSegmentPositions) {
 			pSegment->mlstPositions.pop_front();
 		}
-		pSegment->mvPostion = 0;
+		pSegment->mvPosition = 0;
 		Common::List<cVector3f>::iterator posIt2 = pSegment->mlstPositions.begin();
 		for (; posIt2 != pSegment->mlstPositions.end(); ++posIt2) {
-			pSegment->mvPostion += *posIt2;
+			pSegment->mvPosition += *posIt2;
 		}
-		pSegment->mvPostion = pSegment->mvPostion / (float)pSegment->mlstPositions.size();
+		pSegment->mvPosition = pSegment->mvPosition / (float)pSegment->mlstPositions.size();
 
 		/////////////////////////////////////////////
 		// Get the movement vector
-		cVector3f vSegMovement = pSegment->mvPostion - vPrevPos;
+		cVector3f vSegMovement = pSegment->mvPosition - vPrevPos;
 
 		/////////////////////////////////////////////
 		// Update body position
-		pSegment->mpBody->SetPosition(pSegment->mvPostion);
+		pSegment->mpBody->SetPosition(pSegment->mvPosition);
 
 		//////////////////////////////////////////////
 		// Get the direction vector of the segment
@@ -796,7 +796,7 @@ void cGameEnemy_Worm::OnUpdate(float afTimeStep) {
 		////////////////////////////////////////
 		// Set the New back pos
 		if (i < mvTailSegments.size() - 1) {
-			vSegBackPos = pSegment->mvPostion +
+			vSegBackPos = pSegment->mvPosition +
 						  pSegment->mvForward * -mvTailSegments[i + 1]->mfDistToFront;
 		}
 	}
@@ -822,10 +822,10 @@ void cGameEnemy_Worm::ExtraPostSceneDraw() {
 	for (size_t i = 0; i < mvTailSegments.size(); ++i) {
 		cWormTailSegment *pSegment = mvTailSegments[i];
 
-		pLowLevelGfx->DrawSphere(pSegment->mvPostion, 0.3f, cColor(1, 1));
+		pLowLevelGfx->DrawSphere(pSegment->mvPosition, 0.3f, cColor(1, 1));
 
-		pLowLevelGfx->DrawLine(pSegment->mvPostion,
-							   pSegment->mvPostion + pSegment->mvForward * 0.5f,
+		pLowLevelGfx->DrawLine(pSegment->mvPosition,
+							   pSegment->mvPosition + pSegment->mvForward * 0.5f,
 							   cColor(1, 0, 1, 1));
 
 		cVector3f vForward = cMath::MatrixMul(cMatrixf::Identity, pSegment->mvForward);
@@ -922,7 +922,7 @@ void cGameEnemy_Worm::SetupTail() {
 		pSegment->mpBone->SetActive(false);
 
 		// Start Position,forward and rotation
-		pSegment->mvPostion = pSegment->mpBone->GetWorldPosition();
+		pSegment->mvPosition = pSegment->mpBone->GetWorldPosition();
 
 		pSegment->mvForward = mpMover->GetCharBody()->GetForward();
 		pSegment->mvUp = mpMover->GetCharBody()->GetUp();
@@ -938,7 +938,7 @@ void cGameEnemy_Worm::SetupTail() {
 		iCollideShape *pShape = pPhysicsWorld->CreateSphereShape(pCharBody->GetSize().x / 2.0f, NULL);
 		pSegment->mpBody = pPhysicsWorld->CreateBody("Tail0" + cString::ToString(i + 1), pShape);
 		pSegment->mpBody->SetMass(0);
-		pSegment->mpBody->SetPosition(pSegment->mvPostion);
+		pSegment->mpBody->SetPosition(pSegment->mvPosition);
 		pSegment->mpBody->SetIsCharacter(true);
 		pSegment->mpBody->SetActive(IsActive());
 
diff --git a/engines/hpl1/penumbra-overture/GameEnemy_Worm.h b/engines/hpl1/penumbra-overture/GameEnemy_Worm.h
index f5ac43fa778..a56fde695d1 100644
--- a/engines/hpl1/penumbra-overture/GameEnemy_Worm.h
+++ b/engines/hpl1/penumbra-overture/GameEnemy_Worm.h
@@ -136,7 +136,7 @@ public:
 	}
 
 	Common::List<cVector3f> mlstPositions;
-	cVector3f mvPostion;
+	cVector3f mvPosition;
 
 	cVector3f mvGoalForward;
 
@@ -259,7 +259,7 @@ private:
 
 	cVector3f mvLastForward;
 
-	int mlMaxSegmentPostions;
+	int mlMaxSegmentPositions;
 	float mfTurnSpeed;
 
 	bool mbFirstUpdate;
diff --git a/engines/hpl1/penumbra-overture/GameEntity.cpp b/engines/hpl1/penumbra-overture/GameEntity.cpp
index b4d5c025d21..ef1ae8d6f03 100644
--- a/engines/hpl1/penumbra-overture/GameEntity.cpp
+++ b/engines/hpl1/penumbra-overture/GameEntity.cpp
@@ -64,7 +64,7 @@ iGameEntity::iGameEntity(cInit *apInit, const tString &asName) {
 
 	mpCharBody = NULL;
 
-	mType = eGameEntityType_Unkown;
+	mType = eGameEntityType_Unknown;
 
 	msDescription = _W("");
 	msGameName = _W("");
diff --git a/engines/hpl1/penumbra-overture/GameTypes.h b/engines/hpl1/penumbra-overture/GameTypes.h
index 67d5208fb34..79f069b8797 100644
--- a/engines/hpl1/penumbra-overture/GameTypes.h
+++ b/engines/hpl1/penumbra-overture/GameTypes.h
@@ -131,7 +131,7 @@ enum eGameDifficulty {
 //---------------------------------
 
 enum eGameEntityType {
-	eGameEntityType_Unkown,
+	eGameEntityType_Unknown,
 	eGameEntityType_Object,
 	eGameEntityType_Door,
 	eGameEntityType_DoorPanel,
diff --git a/engines/hpl1/penumbra-overture/HudModel_Weapon.cpp b/engines/hpl1/penumbra-overture/HudModel_Weapon.cpp
index 8a0eaa15dbb..65455a56071 100644
--- a/engines/hpl1/penumbra-overture/HudModel_Weapon.cpp
+++ b/engines/hpl1/penumbra-overture/HudModel_Weapon.cpp
@@ -490,7 +490,7 @@ void cHudModel_WeaponMelee::Attack() {
 	cWorld3D *pWorld = mpInit->mpGame->GetScene()->GetWorld3D();
 	iPhysicsWorld *pPhysicsWorld = pWorld->GetPhysicsWorld();
 
-	tVector3fList lstPostions;
+	tVector3fList lstPositions;
 
 	////////////////////////////////
 	// Iterate Enemies
@@ -512,7 +512,7 @@ void cHudModel_WeaponMelee::Attack() {
 			}*/
 			if (pEnemy->GetMeshEntity()->CheckColliderShapeCollision(pPhysicsWorld,
 																	 mvAttacks[mlCurrentAttack].mpCollider,
-																	 mtxDamage, &lstPostions, NULL) == false) {
+																	 mtxDamage, &lstPositions, NULL) == false) {
 				continue;
 			}
 
@@ -549,7 +549,7 @@ void cHudModel_WeaponMelee::Attack() {
 			// Get closest position
 			float fClosestDist = 9999.0f;
 			cVector3f vClosestPostion = vCenter;
-			for (tVector3fListIt it = lstPostions.begin(); it != lstPostions.end(); ++it) {
+			for (tVector3fListIt it = lstPositions.begin(); it != lstPositions.end(); ++it) {
 				cVector3f &vPos = *it;
 
 				float fDist = cMath::Vector3DistSqr(pCamera->GetPosition(), vPos);
@@ -565,7 +565,7 @@ void cHudModel_WeaponMelee::Attack() {
 											 cMath::MatrixTranslate(vClosestPostion));
 			}
 
-			lstPostions.clear();
+			lstPositions.clear();
 
 			bHit = true;
 		}
diff --git a/engines/hpl1/penumbra-overture/PlayerHands.cpp b/engines/hpl1/penumbra-overture/PlayerHands.cpp
index e9e321af893..a6c3af993b5 100644
--- a/engines/hpl1/penumbra-overture/PlayerHands.cpp
+++ b/engines/hpl1/penumbra-overture/PlayerHands.cpp
@@ -251,7 +251,7 @@ void cPlayerHands::OnStart() {
 //-----------------------------------------------------------------------
 
 void cPlayerHands::Update(float afTimeStep) {
-	UpdatePrevPostions();
+	UpdatePrevPositions();
 
 	///////////////////////////////////
 	// Get the camera properties
@@ -589,7 +589,7 @@ void cPlayerHands::OnWorldLoad() {
 //////////////////////////////////////////////////////////////////////////
 
 //-----------------------------------------------------------------------
-void cPlayerHands::UpdatePrevPostions() {
+void cPlayerHands::UpdatePrevPositions() {
 	///////////////////////////////////
 	// Get current position
 	cCamera3D *pCam = mpInit->mpPlayer->GetCamera();
diff --git a/engines/hpl1/penumbra-overture/PlayerHands.h b/engines/hpl1/penumbra-overture/PlayerHands.h
index 73ada72f815..ed660e3b84f 100644
--- a/engines/hpl1/penumbra-overture/PlayerHands.h
+++ b/engines/hpl1/penumbra-overture/PlayerHands.h
@@ -178,7 +178,7 @@ public:
 	iHudModel *GetCurrentModel(int alNum) { return mvCurrentHudModels[alNum]; }
 
 private:
-	void UpdatePrevPostions();
+	void UpdatePrevPositions();
 
 	cInit *mpInit;
 	cMeshManager *mpMeshManager;




More information about the Scummvm-git-logs mailing list