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