SoundData:getBlob

This commit is contained in:
Nevyn Bengtsson 2020-11-26 22:14:02 +01:00 committed by Bjorn
parent 139c80fc28
commit a344acd84f
1 changed files with 9 additions and 2 deletions

View File

@ -1,7 +1,14 @@
#include "api.h"
#include "data/soundData.h"
#include "core/util.h"
#include "data/blob.h"
static int l_lovrSoundDataGetBlob(lua_State* L) {
SoundData* soundData = luax_checktype(L, 1, SoundData);
Blob* blob = soundData->blob;
luax_pushtype(L, Blob, blob);
return 1;
}
const luaL_Reg lovrSoundData[] = {
{ NULL, NULL }
{ "getBlob", l_lovrSoundDataGetBlob }
};