Alientech 0.01
An extendable game engine
C:/Alientech/TestWTF/ACHCommonUtils.cpp
Go to the documentation of this file.
00001 #include "ACHCommonUtils.h"
00002 
00003 string readName(ifstream* file)
00004 {
00005         unsigned char nameLength;
00006         file->read((char*)&nameLength,1);
00007         char* nameCStr = new char[nameLength];
00008         file->read(nameCStr,nameLength);
00009         return string(nameCStr);
00010 }
00011 
00012 int readInt(ifstream* file)
00013 {
00014         int number;
00015         file->read((char*)&number,4);
00016         return number;
00017 }
00018 
00019 unsigned readUnsigned(ifstream* file)
00020 {
00021         unsigned number;
00022         file->read((char*)&number,4);
00023         return number;
00024 }