Merge dynamiccore2 into minor

Instead of a global type enum and bitfield, all types now have their own
love::Type static member. This means they automatically assign their ids, build
their bitsets, etc. As a bonus, it simplifies wrapper code since most functions
already know which type they're pushing to or getting from lua, so they can
directly get the static member (if it's called 'type').

--HG--
branch : minor
This commit is contained in:
Bart van Strien
2016-11-30 22:38:30 +01:00
204 changed files with 944 additions and 669 deletions
+4 -4
View File
@@ -73,7 +73,7 @@ int w_newImageData(lua_State *L)
memcpy(t->getData(), bytes, t->getSize());
}
luax_pushtype(L, IMAGE_IMAGE_DATA_ID, t);
luax_pushtype(L, t);
t->release();
return 1;
}
@@ -87,7 +87,7 @@ int w_newImageData(lua_State *L)
[&](bool) { data->release(); }
);
luax_pushtype(L, IMAGE_IMAGE_DATA_ID, t);
luax_pushtype(L, t);
t->release();
return 1;
}
@@ -107,7 +107,7 @@ int w_newCompressedData(lua_State *L)
[&](bool) { data->release(); }
);
luax_pushtype(L, IMAGE_COMPRESSED_IMAGE_DATA_ID, t);
luax_pushtype(L, CompressedImageData::type, t);
t->release();
return 1;
}
@@ -151,7 +151,7 @@ extern "C" int luaopen_love_image(lua_State *L)
WrappedModule w;
w.module = instance;
w.name = "image";
w.type = MODULE_IMAGE_ID;
w.type = &Image::type;
w.functions = functions;
w.types = types;