Changed all the files encoding to UTF-8
Named modules in licence informations
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Utility module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright (C) 2011 Jérôme Leclercq
|
||||
// This file is part of the "Ungine".
|
||||
// For conditions of distribution and use, see copyright notice in Core.h
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Utility module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Utility/Loaders/MD2/Constants.hpp>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright (C) 2011 Jérôme Leclercq
|
||||
// This file is part of the "Ungine".
|
||||
// For conditions of distribution and use, see copyright notice in Core.h
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Utility module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#ifndef NAZARA_LOADERS_MD2_CONSTANTS_HPP
|
||||
#define NAZARA_LOADERS_MD2_CONSTANTS_HPP
|
||||
@@ -21,16 +21,16 @@ struct md2_header
|
||||
|
||||
nzUInt32 num_skins; // nombre de skins
|
||||
nzUInt32 num_vertices; // nombre de vertices par frame
|
||||
nzUInt32 num_st; // nombre de coordonnées de texture
|
||||
nzUInt32 num_st; // nombre de coordonnées de texture
|
||||
nzUInt32 num_tris; // nombre de triangles
|
||||
nzUInt32 num_glcmds; // nombre de commandes opengl
|
||||
nzUInt32 num_frames; // nombre de frames
|
||||
|
||||
nzUInt32 offset_skins; // offset données skins
|
||||
nzUInt32 offset_st; // offset données coordonnées de texture
|
||||
nzUInt32 offset_tris; // offset données triangles
|
||||
nzUInt32 offset_frames; // offset données frames
|
||||
nzUInt32 offset_glcmds; // offset données commandes OpenGL
|
||||
nzUInt32 offset_skins; // offset données skins
|
||||
nzUInt32 offset_st; // offset données coordonnées de texture
|
||||
nzUInt32 offset_tris; // offset données triangles
|
||||
nzUInt32 offset_frames; // offset données frames
|
||||
nzUInt32 offset_glcmds; // offset données commandes OpenGL
|
||||
nzUInt32 offset_end; // offset fin de fichier
|
||||
};
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright (C) 2011 Jérôme Leclercq
|
||||
// This file is part of the "Ungine".
|
||||
// For conditions of distribution and use, see copyright notice in Core.h
|
||||
// Copyright (C) 2011 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Utility module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Utility/Loaders/MD2.hpp>
|
||||
#include <Nazara/Core/Endianness.hpp>
|
||||
@@ -92,8 +92,8 @@ namespace
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Création du mesh
|
||||
// Animé ou statique, c'est la question
|
||||
/// Création du mesh
|
||||
// Animé ou statique, c'est la question
|
||||
bool animated;
|
||||
unsigned int startFrame = NzClamp(parameters.animation.startFrame, 0U, static_cast<unsigned int>(header.num_frames-1));
|
||||
unsigned int endFrame = NzClamp(parameters.animation.endFrame, 0U, static_cast<unsigned int>(header.num_frames-1));
|
||||
@@ -103,7 +103,7 @@ namespace
|
||||
else
|
||||
animated = false;
|
||||
|
||||
if (!mesh->Create((animated) ? nzAnimationType_Keyframe : nzAnimationType_Static)) // Ne devrait pas échouer
|
||||
if (!mesh->Create((animated) ? nzAnimationType_Keyframe : nzAnimationType_Static)) // Ne devrait pas échouer
|
||||
{
|
||||
NazaraInternalError("Failed to create mesh");
|
||||
return false;
|
||||
@@ -129,11 +129,11 @@ namespace
|
||||
NzAnimation* animation = new NzAnimation;
|
||||
if (animation->Create(nzAnimationType_Keyframe, endFrame-startFrame+1))
|
||||
{
|
||||
// Décodage des séquences
|
||||
// Décodage des séquences
|
||||
NzString frameName;
|
||||
|
||||
NzSequence sequence;
|
||||
sequence.framePerSecond = 10; // Par défaut pour les animations MD2
|
||||
sequence.framePerSecond = 10; // Par défaut pour les animations MD2
|
||||
|
||||
char name[16], last[16];
|
||||
stream.SetCursorPos(header.offset_frames + startFrame*header.framesize + offsetof(md2_frame, name));
|
||||
@@ -165,9 +165,9 @@ namespace
|
||||
}
|
||||
name[pos+1] = '\0';
|
||||
|
||||
if (std::strcmp(name, last) != 0) // Si les deux frames n'ont pas le même nom
|
||||
if (std::strcmp(name, last) != 0) // Si les deux frames n'ont pas le même nom
|
||||
{
|
||||
// Alors on enregistre la séquence
|
||||
// Alors on enregistre la séquence
|
||||
sequence.firstFrame = i-numFrames;
|
||||
sequence.lastFrame = i-1;
|
||||
sequence.name = last;
|
||||
@@ -181,7 +181,7 @@ namespace
|
||||
numFrames++;
|
||||
}
|
||||
|
||||
// On ajoute la dernière frame (Qui n'a pas été traitée par la boucle)
|
||||
// On ajoute la dernière frame (Qui n'a pas été traitée par la boucle)
|
||||
sequence.firstFrame = endFrame-numFrames;
|
||||
sequence.lastFrame = endFrame;
|
||||
sequence.name = last;
|
||||
@@ -196,7 +196,7 @@ namespace
|
||||
|
||||
/// Chargement des submesh
|
||||
// Actuellement le loader ne charge qu'un submesh
|
||||
// TODO: Utiliser les commandes OpenGL pour accélérer le rendu
|
||||
// TODO: Utiliser les commandes OpenGL pour accélérer le rendu
|
||||
NzMD2Mesh* subMesh = new NzMD2Mesh(mesh);
|
||||
if (!subMesh->Create(header, stream, parameters))
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright (C) 2011 Jérôme Leclercq
|
||||
// This file is part of the "Ungine".
|
||||
// For conditions of distribution and use, see copyright notice in Core.h
|
||||
// Copyright (C) 2011 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Utility module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Utility/Loaders/MD2/Mesh.hpp>
|
||||
#include <Nazara/Core/InputStream.hpp>
|
||||
@@ -37,7 +37,7 @@ bool NzMD2Mesh::Create(const md2_header& header, NzInputStream& stream, const Nz
|
||||
std::vector<md2_texCoord> texCoords(header.num_st);
|
||||
std::vector<md2_triangle> triangles(header.num_tris);
|
||||
|
||||
// Lecture des coordonnées de texture
|
||||
// Lecture des coordonnées de texture
|
||||
stream.SetCursorPos(header.offset_st);
|
||||
stream.Read(&texCoords[0], header.num_st*sizeof(md2_texCoord));
|
||||
|
||||
@@ -71,7 +71,7 @@ bool NzMD2Mesh::Create(const md2_header& header, NzInputStream& stream, const Nz
|
||||
md2_frame frame;
|
||||
frame.vertices.resize(header.num_vertices);
|
||||
|
||||
// Pour que le modèle soit correctement aligné, on génère une matrice de rotation que nous appliquerons à chacune des vertices
|
||||
// Pour que le modèle soit correctement aligné, on génère une matrice de rotation que nous appliquerons à chacune des vertices
|
||||
NzMatrix4f rotationMatrix = NzMatrix4f::Rotate(NzEulerAnglesf(90.f, -90.f, 0.f));
|
||||
|
||||
unsigned int stride = s_declaration.GetStride(nzElementStream_VertexData);
|
||||
@@ -94,7 +94,7 @@ bool NzMD2Mesh::Create(const md2_header& header, NzInputStream& stream, const Nz
|
||||
NzByteSwap(&frame.translate.z, sizeof(float));
|
||||
#endif
|
||||
|
||||
m_frames[i].normal = new nzUInt8[m_vertexCount]; // Nous stockons l'indice de la normale plutôt que la normale (gain d'espace)
|
||||
m_frames[i].normal = new nzUInt8[m_vertexCount]; // Nous stockons l'indice de la normale plutôt que la normale (gain d'espace)
|
||||
m_frames[i].vertices = new NzVector3f[m_vertexCount];
|
||||
|
||||
NzVector3f max, min;
|
||||
@@ -128,7 +128,7 @@ bool NzMD2Mesh::Create(const md2_header& header, NzInputStream& stream, const Nz
|
||||
return false;
|
||||
}
|
||||
|
||||
// On avance jusqu'aux premières coordonnées de texture
|
||||
// On avance jusqu'aux premières coordonnées de texture
|
||||
ptr += s_declaration.GetElement(nzElementStream_VertexData, nzElementUsage_TexCoord)->offset;
|
||||
for (unsigned int t = 0; t < header.num_tris; ++t)
|
||||
{
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Utility module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Utility module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright (C) 2011 Jérôme Leclercq
|
||||
// This file is part of the "Ungine".
|
||||
// For conditions of distribution and use, see copyright notice in Core.h
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Utility module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Utility/Loaders/PCX.hpp>
|
||||
#include <Nazara/Core/Endianness.hpp>
|
||||
@@ -339,7 +339,7 @@ namespace
|
||||
}
|
||||
|
||||
default:
|
||||
NazaraError("Unable to load " + NzString::Number(bitCount) + " bitcount pcx files");
|
||||
NazaraError("Failed to load " + NzString::Number(bitCount) + " bitcount pcx files");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine".
|
||||
// Copyright (C) 2012 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Utility module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Copyright (C) 2011 Jérôme Leclercq
|
||||
// This file is part of the "Ungine".
|
||||
// For conditions of distribution and use, see copyright notice in Core.h
|
||||
// Copyright (C) 2011 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Utility module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Utility/Loaders/STB.hpp>
|
||||
#include <Nazara/Core/Endianness.hpp>
|
||||
|
||||
Reference in New Issue
Block a user