mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-06 08:59:11 +01:00
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
31 lines
572 B
C++
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
|