Files
TrinityCore/dep/include/g3dlite/G3D/serialize.h
click e777161888 HIGHLY EXPERIMENTAL - USE AT YOUR OWN RISK
Implement the use of the new vmap3-format by Lynx3d (mad props to you for this, and thanks for the talks earlier)
+ reduced Vmap size to less than one third, and improve precision
+ indoor/outdoor check which allows automatic unmounting of players
+ additional area information from WMOAreaTable.dbc, removed existing "hacks"
+ WMO liquid information for swimming and fishing correctly in buildings/cities/caves/instances (lava and slime WILL hurt from now on!)
- buildfiles for windows are not properly done, and will need to be sorted out
NOTE: Do NOT annoy Lynx3d about this, any issues with this "port" is entirely our fault !
THIS REVISION IS CONSIDERED UNSTABLE AND CONTAINS WORK IN PROGRESS - USE AT YOUR OWN RISK!

--HG--
branch : trunk
2010-06-05 00:59:25 +02:00

31 lines
572 B
C++

#ifndef G3D_SERIALIZE_H
#define G3D_SERIALIZE_H
#include "G3D/BinaryInput.h"
#include "G3D/BinaryOutput.h"
#include "G3D/Array.h"
namespace G3D {
template<typename T>
void serialize(const Array<T>& array, BinaryOutput& b) {
b.writeInt32(array.size());
for (int i = 0; i < array.size(); ++i) {
serialize(array[i], b);
}
}
template<typename T>
void deserialize(Array<T>& array, BinaryInput& b) {
int N = b.readInt32();
array.resize(N);
for (int i = 0; i < array.size(); ++i) {
deserialize(array[i], b);
}
}
}
#endif