Switch from Nz prefix to namespace Nz

What a huge commit


Former-commit-id: 38ac5eebf70adc1180f571f6006192d28fb99897
This commit is contained in:
Lynix
2015-09-25 19:20:05 +02:00
parent c214251ecf
commit df8da275c4
609 changed files with 68265 additions and 66534 deletions

View File

@@ -11,7 +11,7 @@
int main()
{
// Pour charger des ressources, il est impératif d'initialiser le module utilitaire
NzInitializer<NzUtility> utility;
Initializer<Utility> utility;
if (!utility)
{
// Ça n'a pas fonctionné, le pourquoi se trouve dans le fichier NazaraLog.log
@@ -22,7 +22,7 @@ int main()
for (;;)
{
NzDirectory resourceDirectory("resources/");
Directory resourceDirectory("resources/");
if (!resourceDirectory.Open())
{
std::cerr << "Failed to open resource directory" << std::endl;
@@ -30,12 +30,12 @@ int main()
return EXIT_FAILURE;
}
std::vector<NzString> models;
std::vector<String> models;
while (resourceDirectory.NextResult())
{
NzString path = resourceDirectory.GetResultName();
NzString ext = path.SubStringFrom('.', -1, true); // Tout ce qui vient après le dernier '.' de la chaîne
if (NzMeshLoader::IsExtensionSupported(ext)) // L'extension est-elle supportée par le MeshLoader ?
String path = resourceDirectory.GetResultName();
String ext = path.SubStringFrom('.', -1, true); // Tout ce qui vient après le dernier '.' de la chaîne
if (MeshLoader::IsExtensionSupported(ext)) // L'extension est-elle supportée par le MeshLoader ?
models.push_back(path);
}
@@ -67,7 +67,7 @@ int main()
if (iChoice == 0)
break;
NzMesh mesh;
Mesh mesh;
if (!mesh.LoadFromFile("resources/" + models[iChoice-1]))
{
std::cout << "Failed to load mesh" << std::endl;
@@ -77,11 +77,11 @@ int main()
switch (mesh.GetAnimationType())
{
case nzAnimationType_Skeletal:
case AnimationType_Skeletal:
std::cout << "This is a skeletal-animated mesh" << std::endl;
break;
case nzAnimationType_Static:
case AnimationType_Static:
std::cout << "This is a static mesh" << std::endl;
break;
@@ -92,9 +92,9 @@ int main()
if (mesh.IsAnimable())
{
if (mesh.GetAnimationType() == nzAnimationType_Skeletal)
if (mesh.GetAnimationType() == AnimationType_Skeletal)
{
const NzSkeleton* skeleton = mesh.GetSkeleton();
const Skeleton* skeleton = mesh.GetSkeleton();
unsigned int jointCount = skeleton->GetJointCount();
std::cout << "It has a skeleton made of " << skeleton->GetJointCount() << " joint(s)." << std::endl;
std::cout << "Print joints ? (Y/N) ";
@@ -107,10 +107,10 @@ int main()
{
for (unsigned int i = 0; i < jointCount; ++i)
{
const NzJoint* joint = skeleton->GetJoint(i);
const Joint* joint = skeleton->GetJoint(i);
std::cout << "\t" << (i+1) << ": " << joint->GetName();
const NzJoint* parent = static_cast<const NzJoint*>(joint->GetParent());
const Joint* parent = static_cast<const Joint*>(joint->GetParent());
if (parent)
std::cout << " (Parent: " << parent->GetName() << ')';
@@ -119,10 +119,10 @@ int main()
}
}
NzString animationPath = mesh.GetAnimation();
String animationPath = mesh.GetAnimation();
if (!animationPath.IsEmpty())
{
NzAnimation animation;
Animation animation;
if (animation.LoadFromFile(animationPath))
{
unsigned int sequenceCount = animation.GetSequenceCount();
@@ -137,7 +137,7 @@ int main()
{
for (unsigned int i = 0; i < sequenceCount; ++i)
{
const NzSequence* sequence = animation.GetSequence(i);
const Sequence* sequence = animation.GetSequence(i);
std::cout << "\t" << (i+1) << ": " << sequence->name << std::endl;
std::cout << "\t\tStart frame: " << sequence->firstFrame << std::endl;
std::cout << "\t\tFrame count: " << sequence->frameCount << std::endl;
@@ -153,7 +153,7 @@ int main()
std::cout << "It's animable but has no animation information" << std::endl;
}
NzBoxf cube = mesh.GetAABB();
Boxf cube = mesh.GetAABB();
std::cout << "Mesh is " << cube.width << " units wide, " << cube.height << " units height and " << cube.depth << " units depth" << std::endl;
unsigned int materialCount = mesh.GetMaterialCount();