Pass CVector3D as const reference in a few places.
Reviewed By: Sandarac Differential Revision: https://code.wildfiregames.com/D424 This was SVN commit r19534.
This commit is contained in:
parent
bdfe500f98
commit
25b1837603
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2010 Wildfire Games.
|
||||
/* Copyright (C) 2017 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -357,7 +357,7 @@ void CCamera::LookAt(const CVector3D& camera, const CVector3D& target, const CVe
|
||||
LookAlong(camera, delta, up);
|
||||
}
|
||||
|
||||
void CCamera::LookAlong(CVector3D camera, CVector3D orientation, CVector3D up)
|
||||
void CCamera::LookAlong(const CVector3D& camera, CVector3D orientation, CVector3D up)
|
||||
{
|
||||
orientation.Normalize();
|
||||
up.Normalize();
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2013 Wildfire Games.
|
||||
/* Copyright (C) 2017 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -95,7 +95,7 @@ class CCamera
|
||||
void LookAt(const CVector3D& camera, const CVector3D& orientation, const CVector3D& up);
|
||||
|
||||
// Build an orientation matrix from camera position, camera orientation, and up-vector
|
||||
void LookAlong(CVector3D camera, CVector3D focus, CVector3D up);
|
||||
void LookAlong(const CVector3D& camera, CVector3D focus, CVector3D up);
|
||||
|
||||
/**
|
||||
* Render: Renders the camera's frustum in world space.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2014 Wildfire Games.
|
||||
/* Copyright (C) 2017 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -47,7 +47,7 @@ public:
|
||||
virtual void PlayAsUI(const VfsPath& itemPath, bool looping) = 0;
|
||||
virtual void PlayAsMusic(const VfsPath& itemPath, bool looping) = 0;
|
||||
virtual void PlayAsAmbient(const VfsPath& itemPath, bool looping) = 0;
|
||||
virtual void PlayAsGroup(const VfsPath& groupPath, CVector3D sourcePos, entity_id_t source, bool ownedSound) = 0;
|
||||
virtual void PlayAsGroup(const VfsPath& groupPath, const CVector3D& sourcePos, entity_id_t source, bool ownedSound) = 0;
|
||||
|
||||
virtual bool InDistress() = 0;
|
||||
};
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2015 Wildfire Games.
|
||||
/* Copyright (C) 2017 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -639,7 +639,7 @@ void CSoundManager::SetMusicEnabled(bool isEnabled)
|
||||
m_MusicEnabled = isEnabled;
|
||||
}
|
||||
|
||||
void CSoundManager::PlayAsGroup(const VfsPath& groupPath, CVector3D sourcePos, entity_id_t source, bool ownedSound)
|
||||
void CSoundManager::PlayAsGroup(const VfsPath& groupPath, const CVector3D& sourcePos, entity_id_t source, bool ownedSound)
|
||||
{
|
||||
// Make sure the sound group is loaded
|
||||
CSoundGroup* group;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2015 Wildfire Games.
|
||||
/* Copyright (C) 2017 Wildfire Games.
|
||||
* This file is part of 0 A.D.
|
||||
*
|
||||
* 0 A.D. is free software: you can redistribute it and/or modify
|
||||
@ -137,7 +137,7 @@ public:
|
||||
void PlayAsMusic(const VfsPath& itemPath, bool looping);
|
||||
void PlayAsAmbient(const VfsPath& itemPath, bool looping);
|
||||
void PlayAsUI(const VfsPath& itemPath, bool looping);
|
||||
void PlayAsGroup(const VfsPath& groupPath, CVector3D sourcePos, entity_id_t source, bool ownedSound);
|
||||
void PlayAsGroup(const VfsPath& groupPath, const CVector3D& sourcePos, entity_id_t source, bool ownedSound);
|
||||
|
||||
void PlayGroupItem(ISoundItem* anItem, ALfloat groupGain);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user