-
Notifications
You must be signed in to change notification settings - Fork 0
/
exports.cpp
38 lines (31 loc) · 933 Bytes
/
exports.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "exports.hpp"
ActNut::MemoryBuffer* ActNut::new_MemoryBuffer(MemoryBuffer::BufferOwnership ownership, uint8_t* buf, size_t buf_size, bool fixed_size)
{
return new MemoryBuffer(ownership, buf, buf_size, fixed_size);
}
void ActNut::delete_buffer(IBuffer *obj)
{
delete obj;
}
void ActNut::delete_object(Object *obj)
{
delete obj;
}
void ActNut::setErrorMode(ActNut::Error::ErrorMode newMode)
{
Error::setErrorMode(newMode);
}
void ActNut::setErrorCallback(ActNut::Error::Callback callback)
{
Error::setErrorCallback(callback);
}
Act::File* Act::read_act_from_bytes(const uint8_t* buf, size_t buf_size)
{
ActNut::MemoryBuffer mbuf(buf, buf_size, true);
return ActNut::Object::read<Act::File>(nullptr, mbuf, "");
}
Nut::Stream* Nut::read_nut_from_bytes(const uint8_t* buf, size_t buf_size)
{
ActNut::MemoryBuffer mbuf(buf, buf_size, true);
return ActNut::Object::read<Nut::Stream>(nullptr, mbuf, "");
}