summaryrefslogtreecommitdiffstats
path: root/src/metafile.cpp
diff options
context:
space:
mode:
authorProgramerus <alcadeias95@gmail.com>2012-03-23 21:43:30 +0100
committerProgramerus <alcadeias95@gmail.com>2012-03-23 21:43:30 +0100
commit128f7c06de5d04385ce56d90d95d39256aa667e1 (patch)
tree44a432a59a1098a6155db7985ab633cde3524603 /src/metafile.cpp
parentc0b77d38eb5a1d7f2d33783cfa0336bff5e4320a (diff)
downloadcolobot-128f7c06de5d04385ce56d90d95d39256aa667e1.tar.gz
colobot-128f7c06de5d04385ce56d90d95d39256aa667e1.tar.bz2
colobot-128f7c06de5d04385ce56d90d95d39256aa667e1.zip
Comments translated from French to English.
Diffstat (limited to 'src/metafile.cpp')
-rw-r--r--src/metafile.cpp35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/metafile.cpp b/src/metafile.cpp
index 77a937c..d7e260e 100644
--- a/src/metafile.cpp
+++ b/src/metafile.cpp
@@ -12,7 +12,9 @@
// * GNU General Public License for more details.
// *
// * You should have received a copy of the GNU General Public License
-// * along with this program. If not, see http://www.gnu.org/licenses/.// metafile.cpp
+// * along with this program. If not, see http://www.gnu.org/licenses/.
+
+// metafile.cpp
#define STRICT
#define D3D_OVERLOADS
@@ -124,7 +126,7 @@ void Codec(void* buffer, int len, int start)
-// Constructeur de l'objet.
+// Object's constructor.
CMetaFile::CMetaFile()
{
@@ -144,7 +146,7 @@ CMetaFile::CMetaFile()
m_stream = 0;
}
-// Destructeur de l'objet.
+// Object's destructor.
CMetaFile::~CMetaFile()
{
@@ -152,7 +154,7 @@ CMetaFile::~CMetaFile()
}
-// Teste si un fichier existe.
+// Test if a file exists.
BOOL CMetaFile::IsExist(char *metaname, char *filename)
{
@@ -182,14 +184,13 @@ BOOL CMetaFile::IsExist(char *metaname, char *filename)
}
}
-// Ouvre un fichier. Si le metaname est vide, on ouvre
-// normalement un fichier.
+// Opens a file. If metaname is empty, it normally opens a file.
int CMetaFile::Open(char *metaname, char *filename)
{
int index, i;
- if ( m_bOpen ) // fichier déjà ouvert ?
+ if ( m_bOpen ) // file already open?
{
Close();
}
@@ -224,7 +225,7 @@ int CMetaFile::Open(char *metaname, char *filename)
}
}
-// Retourne la longueur d'un fichier.
+// Returns the length of a file.
int CMetaFile::RetLength()
{
@@ -245,7 +246,7 @@ int CMetaFile::RetLength()
return len;
}
-// Positionnement dans le fichier, relatif au début.
+// Positioning in the file, relative to the beginning.
int CMetaFile::Seek(int offset)
{
@@ -262,7 +263,7 @@ int CMetaFile::Seek(int offset)
}
}
-// Lit n bytes.
+// Reads bytes number.
int CMetaFile::Read(void *buffer, int size)
{
@@ -283,7 +284,7 @@ int CMetaFile::Read(void *buffer, int size)
}
}
-// Lit un byte.
+// Reads a byte.
int CMetaFile::GetByte()
{
@@ -300,7 +301,7 @@ int CMetaFile::GetByte()
return b;
}
-// Lit 2 bytes.
+// Reads 2 bytes.
int CMetaFile::GetWord()
{
@@ -317,7 +318,7 @@ int CMetaFile::GetWord()
return w;
}
-// Ferme le fichier.
+// Closes the file.
int CMetaFile::Close()
{
@@ -334,7 +335,7 @@ int CMetaFile::Close()
}
-// Ouvre un metafile. Retourne l'index ou -1.
+// Opens a metafile. Returns the index or -1.
int CMetaFile::MetaOpen(char *metaname)
{
@@ -350,7 +351,7 @@ int CMetaFile::MetaOpen(char *metaname)
m_list[i].stream = fopen(metaname, "rb");
if ( m_list[i].stream == 0 ) return -1;
- strcpy(m_list[i].name, metaname); // mémorise le nom
+ strcpy(m_list[i].name, metaname); // memorized the name
fread(&m_list[i].total, sizeof(int), 1, m_list[i].stream);
m_list[i].headers = (MetaHeader*)malloc(sizeof(MetaHeader)*m_list[i].total);
@@ -369,7 +370,7 @@ int CMetaFile::MetaOpen(char *metaname)
return -1;
}
-// Cherche si le metafile est déjà ouvert. Retourne l'index ou -1.
+// Seeks if the metafile is already open. Returns the index or -1.
int CMetaFile::MetaSearch(char *metaname)
{
@@ -386,7 +387,7 @@ int CMetaFile::MetaSearch(char *metaname)
return -1;
}
-// Ferme tous ls metafiles.
+// Closes all metafiles.
int CMetaFile::MetaClose()
{