2017-03-11 11:08:07 +00:00
|
|
|
#include "luax.h"
|
2018-02-20 05:04:53 +00:00
|
|
|
#include "data/blob.h"
|
2017-03-11 22:13:49 +00:00
|
|
|
#include "graphics/mesh.h"
|
2017-03-11 11:08:07 +00:00
|
|
|
#include "math/math.h"
|
2017-07-27 05:02:17 +00:00
|
|
|
#include "math/randomGenerator.h"
|
2017-05-19 21:04:34 +00:00
|
|
|
#include "physics/physics.h"
|
2017-03-11 11:08:07 +00:00
|
|
|
#include "lib/map/map.h"
|
|
|
|
|
2018-01-21 22:20:06 +00:00
|
|
|
// Module loaders
|
2018-02-17 17:18:08 +00:00
|
|
|
int l_lovrInit(lua_State* L);
|
2017-03-11 11:08:07 +00:00
|
|
|
int l_lovrAudioInit(lua_State* L);
|
2018-01-16 07:13:26 +00:00
|
|
|
int l_lovrDataInit(lua_State* L);
|
2017-03-11 11:08:07 +00:00
|
|
|
int l_lovrEventInit(lua_State* L);
|
|
|
|
int l_lovrFilesystemInit(lua_State* L);
|
|
|
|
int l_lovrGraphicsInit(lua_State* L);
|
|
|
|
int l_lovrHeadsetInit(lua_State* L);
|
|
|
|
int l_lovrMathInit(lua_State* L);
|
2017-05-16 04:59:53 +00:00
|
|
|
int l_lovrPhysicsInit(lua_State* L);
|
2018-02-12 04:34:32 +00:00
|
|
|
int l_lovrThreadInit(lua_State* L);
|
2017-03-11 11:08:07 +00:00
|
|
|
int l_lovrTimerInit(lua_State* L);
|
|
|
|
|
2018-01-21 22:20:06 +00:00
|
|
|
// Modules
|
2018-02-17 17:18:08 +00:00
|
|
|
extern const luaL_Reg lovr[];
|
2017-03-11 11:08:07 +00:00
|
|
|
extern const luaL_Reg lovrAudio[];
|
2018-01-21 22:20:06 +00:00
|
|
|
extern const luaL_Reg lovrData[];
|
|
|
|
extern const luaL_Reg lovrEvent[];
|
|
|
|
extern const luaL_Reg lovrFilesystem[];
|
|
|
|
extern const luaL_Reg lovrGraphics[];
|
|
|
|
extern const luaL_Reg lovrHeadset[];
|
|
|
|
extern const luaL_Reg lovrMath[];
|
|
|
|
extern const luaL_Reg lovrPhysics[];
|
2018-02-12 04:34:32 +00:00
|
|
|
extern const luaL_Reg lovrThreadModule[];
|
2018-01-21 22:20:06 +00:00
|
|
|
extern const luaL_Reg lovrTimer[];
|
|
|
|
|
|
|
|
// Objects
|
|
|
|
extern const luaL_Reg lovrAnimator[];
|
2018-01-21 21:26:00 +00:00
|
|
|
extern const luaL_Reg lovrAudioStream[];
|
2017-05-25 00:38:03 +00:00
|
|
|
extern const luaL_Reg lovrBallJoint[];
|
2018-01-14 21:35:57 +00:00
|
|
|
extern const luaL_Reg lovrBlob[];
|
2017-05-16 21:37:05 +00:00
|
|
|
extern const luaL_Reg lovrBoxShape[];
|
2017-12-07 07:50:52 +00:00
|
|
|
extern const luaL_Reg lovrCanvas[];
|
2017-05-16 21:52:41 +00:00
|
|
|
extern const luaL_Reg lovrCapsuleShape[];
|
2018-02-18 00:51:32 +00:00
|
|
|
extern const luaL_Reg lovrChannel[];
|
2017-03-11 11:08:07 +00:00
|
|
|
extern const luaL_Reg lovrController[];
|
2017-05-16 21:56:20 +00:00
|
|
|
extern const luaL_Reg lovrCylinderShape[];
|
2017-05-20 02:11:58 +00:00
|
|
|
extern const luaL_Reg lovrCollider[];
|
2017-06-10 22:13:19 +00:00
|
|
|
extern const luaL_Reg lovrDistanceJoint[];
|
2017-03-11 11:08:07 +00:00
|
|
|
extern const luaL_Reg lovrFont[];
|
2017-05-25 07:48:02 +00:00
|
|
|
extern const luaL_Reg lovrHingeJoint[];
|
2017-05-25 00:38:03 +00:00
|
|
|
extern const luaL_Reg lovrJoint[];
|
2017-10-21 21:05:58 +00:00
|
|
|
extern const luaL_Reg lovrMaterial[];
|
2017-03-11 22:13:49 +00:00
|
|
|
extern const luaL_Reg lovrMesh[];
|
2017-03-11 11:08:07 +00:00
|
|
|
extern const luaL_Reg lovrModel[];
|
2018-01-23 02:24:39 +00:00
|
|
|
extern const luaL_Reg lovrModelData[];
|
2017-07-27 05:02:17 +00:00
|
|
|
extern const luaL_Reg lovrRandomGenerator[];
|
2018-01-22 16:40:47 +00:00
|
|
|
extern const luaL_Reg lovrRasterizer[];
|
2017-03-11 11:08:07 +00:00
|
|
|
extern const luaL_Reg lovrShader[];
|
2017-05-16 21:37:05 +00:00
|
|
|
extern const luaL_Reg lovrShape[];
|
2017-05-25 07:48:02 +00:00
|
|
|
extern const luaL_Reg lovrSliderJoint[];
|
2017-03-11 11:08:07 +00:00
|
|
|
extern const luaL_Reg lovrSource[];
|
2017-05-16 21:21:10 +00:00
|
|
|
extern const luaL_Reg lovrSphereShape[];
|
2017-03-11 11:08:07 +00:00
|
|
|
extern const luaL_Reg lovrTexture[];
|
2018-01-21 05:33:09 +00:00
|
|
|
extern const luaL_Reg lovrTextureData[];
|
2018-02-12 07:03:43 +00:00
|
|
|
extern const luaL_Reg lovrThread[];
|
2017-03-11 11:08:07 +00:00
|
|
|
extern const luaL_Reg lovrTransform[];
|
2018-02-11 01:27:29 +00:00
|
|
|
extern const luaL_Reg lovrVertexData[];
|
2017-05-16 05:02:08 +00:00
|
|
|
extern const luaL_Reg lovrWorld[];
|
2017-03-11 11:08:07 +00:00
|
|
|
|
2018-01-21 22:20:06 +00:00
|
|
|
// Enums
|
2018-01-26 02:31:56 +00:00
|
|
|
extern map_int_t ArcModes;
|
|
|
|
extern map_int_t AttributeTypes;
|
2017-03-12 11:03:36 +00:00
|
|
|
extern map_int_t BlendAlphaModes;
|
|
|
|
extern map_int_t BlendModes;
|
2017-03-11 11:08:07 +00:00
|
|
|
extern map_int_t CompareModes;
|
|
|
|
extern map_int_t ControllerAxes;
|
|
|
|
extern map_int_t ControllerButtons;
|
2017-08-13 05:58:59 +00:00
|
|
|
extern map_int_t ControllerHands;
|
2017-03-11 11:08:07 +00:00
|
|
|
extern map_int_t DrawModes;
|
|
|
|
extern map_int_t EventTypes;
|
|
|
|
extern map_int_t FilterModes;
|
|
|
|
extern map_int_t HeadsetEyes;
|
2017-08-04 05:21:49 +00:00
|
|
|
extern map_int_t HeadsetOrigins;
|
2017-08-13 05:58:59 +00:00
|
|
|
extern map_int_t HeadsetTypes;
|
2017-03-16 03:12:56 +00:00
|
|
|
extern map_int_t HorizontalAligns;
|
2017-05-25 00:38:03 +00:00
|
|
|
extern map_int_t JointTypes;
|
2017-10-21 21:05:58 +00:00
|
|
|
extern map_int_t MaterialColors;
|
2018-02-12 03:16:40 +00:00
|
|
|
extern map_int_t MaterialScalars;
|
2017-10-21 21:05:58 +00:00
|
|
|
extern map_int_t MaterialTextures;
|
2017-08-11 05:23:19 +00:00
|
|
|
extern map_int_t MatrixTypes;
|
2017-03-12 11:03:36 +00:00
|
|
|
extern map_int_t MeshDrawModes;
|
|
|
|
extern map_int_t MeshUsages;
|
2017-03-11 11:08:07 +00:00
|
|
|
extern map_int_t PolygonWindings;
|
2017-05-16 18:17:01 +00:00
|
|
|
extern map_int_t ShapeTypes;
|
2017-12-09 18:49:37 +00:00
|
|
|
extern map_int_t TextureFormats;
|
2018-02-21 01:15:00 +00:00
|
|
|
extern map_int_t TextureTypes;
|
2017-03-11 11:08:07 +00:00
|
|
|
extern map_int_t TimeUnits;
|
2017-03-16 03:12:56 +00:00
|
|
|
extern map_int_t VerticalAligns;
|
2017-03-11 11:08:07 +00:00
|
|
|
extern map_int_t WrapModes;
|
|
|
|
|
2018-01-21 22:20:06 +00:00
|
|
|
// Shared helpers
|
2018-02-11 01:27:29 +00:00
|
|
|
void luax_checkvertexformat(lua_State* L, int index, VertexFormat* format);
|
2018-01-27 21:43:20 +00:00
|
|
|
int luax_pushvertexformat(lua_State* L, VertexFormat* format);
|
2018-02-11 01:27:29 +00:00
|
|
|
int luax_pushvertexattribute(lua_State* L, VertexPointer* vertex, Attribute attribute);
|
|
|
|
int luax_pushvertex(lua_State* L, VertexPointer* vertex, VertexFormat* format);
|
|
|
|
void luax_setvertexattribute(lua_State* L, int index, VertexPointer* vertex, Attribute attribute);
|
|
|
|
void luax_setvertex(lua_State* L, int index, VertexPointer* vertex, VertexFormat* format);
|
2017-10-31 08:14:09 +00:00
|
|
|
int luax_readtransform(lua_State* L, int index, mat4 transform, bool uniformScale);
|
2017-04-02 12:55:21 +00:00
|
|
|
Blob* luax_readblob(lua_State* L, int index, const char* debug);
|
2017-05-19 21:04:34 +00:00
|
|
|
int luax_pushshape(lua_State* L, Shape* shape);
|
2017-05-25 00:38:03 +00:00
|
|
|
int luax_pushjoint(lua_State* L, Joint* joint);
|
2017-07-27 05:02:17 +00:00
|
|
|
Seed luax_checkrandomseed(lua_State* L, int index);
|