1
0
forked from 0ad/0ad
0ad/source/tools/atlas/DatafileIO/Util.h
Ykkrosh aa118403bb Terrain: CalcFromPosition, to convert world-space to tile-space.
ScEd: Compilation fixes.
Atlas: Screen-space to world-space conversion when editing terrain.
Wireframe option. Minor wxWidgets 2.6.1 fixes. AoE3Ed.

This was SVN commit r2698.
2005-09-12 20:04:26 +00:00

29 lines
688 B
C++

#include <string>
#include <cassert>
#ifndef C_ASSERT
#define C_ASSERT(e) typedef char __C_ASSERT__[(e)?1:-1]
#endif
namespace DatafileIO
{
// TODO: proper portability
typedef int int32_t;
typedef unsigned int uint32_t;
typedef unsigned short uint16_t;
typedef std::wstring utf16string;
typedef wchar_t utf16_t;
C_ASSERT(sizeof(int32_t) == 4);
C_ASSERT(sizeof(uint32_t) == 4);
C_ASSERT(sizeof(uint16_t) == 2);
C_ASSERT(sizeof(utf16_t) == 2);
class InputStream;
class OutputStream;
// Read/write 4-byte length + UCS-2 string
utf16string ReadUString(InputStream& stream);
void WriteUString(OutputStream& stream, const utf16string& string);
}