Updated ozz-animation to version 0.14.1 @35b2efd4

This commit is contained in:
Martin Felis
2023-03-26 13:28:12 +02:00
parent bf3189ff49
commit 15871f349c
194 changed files with 3495 additions and 1957 deletions
+10 -10
View File
@@ -77,16 +77,16 @@
// integrity, like data corruption or file truncation, must also be validated on
// the user side.
#include <stdint.h>
#include <cassert>
#include "ozz/base/endianness.h"
#include "ozz/base/io/archive_traits.h"
#include "ozz/base/io/stream.h"
#include "ozz/base/platform.h"
#include "ozz/base/span.h"
#include <stdint.h>
#include <cassert>
#include "ozz/base/io/archive_traits.h"
namespace ozz {
namespace io {
namespace internal {
@@ -102,7 +102,7 @@ struct Tagger;
// The output endianness mode is set at construction time. It is written to the
// stream to allow the IArchive to perform the required conversion to the native
// endianness mode while reading.
class OArchive {
class OZZ_BASE_DLL OArchive {
public:
// Constructs an output archive from the Stream _stream that must be valid
// and opened for writing.
@@ -126,7 +126,7 @@ class OArchive {
}
// Primitive type saving.
#define OZZ_IO_PRIMITIVE_TYPE(_type) \
#define OZZ_IO_PRIMITIVE_TYPE(_type) \
void operator<<(_type _v) { \
_type v = endian_swap_ ? EndianSwapper<_type>::Swap(_v) : _v; \
OZZ_IF_DEBUG(size_t size =) stream_->Write(&v, sizeof(v)); \
@@ -171,7 +171,7 @@ class OArchive {
// Implements input archive concept used to load/de-serialize data to a Stream.
// Endianness conversions are automatically performed according to the Archive
// and the native formats.
class IArchive {
class OZZ_BASE_DLL IArchive {
public:
// Constructs an input archive from the Stream _stream that must be opened for
// reading, at the same tell (position in the stream) as when it was passed to
@@ -199,7 +199,7 @@ class IArchive {
}
// Primitive type loading.
#define OZZ_IO_PRIMITIVE_TYPE(_type) \
#define OZZ_IO_PRIMITIVE_TYPE(_type) \
void operator>>(_type& _v) { \
_type v; \
OZZ_IF_DEBUG(size_t size =) stream_->Read(&v, sizeof(v)); \
@@ -314,7 +314,7 @@ struct Version<const Array<_Ty>> {
};
// Specializes Array Save/Load for primitive types.
#define OZZ_IO_PRIMITIVE_TYPE(_type) \
#define OZZ_IO_PRIMITIVE_TYPE(_type) \
template <> \
inline void Array<const _type>::Save(OArchive& _archive) const { \
if (_archive.endian_swap()) { \
+6 -6
View File
@@ -31,16 +31,16 @@
// Provides Stream interface used to read/write a memory buffer or a file with
// Crt fread/fwrite/fseek/ftell like functions.
#include "ozz/base/platform.h"
#include <cstddef>
#include "ozz/base/platform.h"
namespace ozz {
namespace io {
// Declares a stream access interface that conforms with CRT FILE API.
// This interface should be used to remap io operations.
class Stream {
class OZZ_BASE_DLL Stream {
public:
// Tests whether a file is opened.
virtual bool opened() const = 0;
@@ -86,7 +86,7 @@ class Stream {
};
// Implements Stream of type File.
class File : public Stream {
class OZZ_BASE_DLL File : public Stream {
public:
// Test if a file at path _filename exists.
// Note that this function is costly. If you aim to open the file right after,
@@ -133,7 +133,7 @@ class File : public Stream {
// Implements an in-memory Stream. Allows to use a memory buffer as a Stream.
// The opening mode is equivalent to fopen w+b (binary read/write).
class MemoryStream : public Stream {
class OZZ_BASE_DLL MemoryStream : public Stream {
public:
// Construct an empty memory stream opened in w+b mode.
MemoryStream();
@@ -172,7 +172,7 @@ class MemoryStream : public Stream {
static const size_t kMaxSize;
// Buffer of data.
char* buffer_;
byte* buffer_;
// The size of the buffer, which is greater or equal to the size of the data
// it contains (end_).