mirror of
https://github.com/love2d/love.git
synced 2026-08-13 17:10:54 +02:00
Add love.data module.
- Moved love.math.compress / decompress / decode / encode / hash to love.data. - Changed love.data.compress/decompress to take the format argument first instead of second. - Added love.data.newDataView. Returns a read-only subsection of an existing Data object. - Added love.data.newByteData. Mostly useful in combination with LuaJIT's FFI as it has no extra methods currently. - Added implementations of Lua 5.3's data packing APIs: love.data.packString / packData / unpack / getPackedSize. Resolves issue #1336. Resolves issue #1331. --HG-- branch : minor
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "wrap_ImageData.h"
|
||||
|
||||
#include "common/wrap_Data.h"
|
||||
#include "data/wrap_Data.h"
|
||||
#include "filesystem/File.h"
|
||||
#include "filesystem/Filesystem.h"
|
||||
|
||||
@@ -366,7 +366,7 @@ extern "C" int luaopen_imagedata(lua_State *L)
|
||||
pushFormats[PIXELFORMAT_RGBA16F] = luax_pushpixel_rgba16f;
|
||||
pushFormats[PIXELFORMAT_RGBA32F] = luax_pushpixel_rgba32f;
|
||||
|
||||
int ret = luax_register_type(L, &ImageData::type, w_Data_functions, w_ImageData_functions, nullptr);
|
||||
int ret = luax_register_type(L, &ImageData::type, data::w_Data_functions, w_ImageData_functions, nullptr);
|
||||
|
||||
luax_gettypemetatable(L, ImageData::type);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user