121 lines
3.5 KiB
C++
121 lines
3.5 KiB
C++
|
|
#ifndef AG_H
|
|
#define AG_H
|
|
|
|
#include <lua.hpp>
|
|
|
|
#include "Engine.h"
|
|
#include "AV.h"
|
|
|
|
namespace ag
|
|
{
|
|
void register_functions(lua_State * L);
|
|
|
|
/* Lua interfaces */
|
|
int callList(lua_State * L);
|
|
int clearEventHandler(lua_State * L);
|
|
int doPhysics(lua_State * L);
|
|
int drawObjects(lua_State * L);
|
|
int elapsedTime(lua_State * L);
|
|
int endFrame(lua_State * L);
|
|
int endList(lua_State * L);
|
|
int exit(lua_State * L);
|
|
int getCamera(lua_State * L);
|
|
int getCursorVisible(lua_State * L);
|
|
int getScreenSize(lua_State * L);
|
|
int import(lua_State * L);
|
|
int isKeyDown(lua_State * L);
|
|
int loadModelSpecify(lua_State * L);
|
|
int loadSound(lua_State * L);
|
|
int loadTexture(lua_State * L);
|
|
int next(lua_State * L);
|
|
int pickObjects(lua_State * L);
|
|
int print(lua_State * L);
|
|
int println(lua_State * L);
|
|
int registerEventHandler(lua_State * L);
|
|
int setAutoDrawObjects(lua_State * L);
|
|
int setAutoEndFrame(lua_State * L);
|
|
int setAutoPhysics(lua_State * L);
|
|
int setAutoStartFrame(lua_State * L);
|
|
int setCamera(lua_State * L);
|
|
int setCursorVisible(lua_State * L);
|
|
int setGravity(lua_State * L);
|
|
int sleep(lua_State * L);
|
|
int startFrame(lua_State * L);
|
|
int startList(lua_State * L);
|
|
int type(lua_State * L);
|
|
int clearWorld(lua_State * L);
|
|
|
|
int _createAMotor(lua_State * L);
|
|
int _createHinge(lua_State * L);
|
|
|
|
/* 2D overlay functions */
|
|
int drawArc(lua_State * L);
|
|
int drawCircle(lua_State * L);
|
|
int drawImage(lua_State * L);
|
|
int drawLine(lua_State * L);
|
|
int drawPoint(lua_State * L);
|
|
int drawRect(lua_State * L);
|
|
int drawText(lua_State * L);
|
|
int fillArc(lua_State * L);
|
|
int fillCircle(lua_State * L);
|
|
int fillRect(lua_State * L);
|
|
int getTextSize(lua_State * L);
|
|
|
|
/* managed object creation functions */
|
|
int createBoxSpecify(lua_State * L);
|
|
int createCapsuleSpecify(lua_State * L);
|
|
int createCylinderSpecify(lua_State * L);
|
|
int createPlaneSpecify(lua_State * L);
|
|
int createSphereSpecify(lua_State * L);
|
|
|
|
namespace object
|
|
{
|
|
Engine::Object * getObject(lua_State * L, int index);
|
|
|
|
int draw(lua_State * L);
|
|
int setPosition(lua_State * L);
|
|
int getPosition(lua_State * L);
|
|
int setRotation(lua_State * L);
|
|
int clone(lua_State * L);
|
|
int destroy(lua_State * L);
|
|
int setVisible(lua_State * L);
|
|
int addForce(lua_State * L);
|
|
int addForceRel(lua_State * L);
|
|
int addTorque(lua_State * L);
|
|
int addTorqueRel(lua_State * L);
|
|
int setColor(lua_State * L);
|
|
int setGravityMode(lua_State * L);
|
|
int setTexture(lua_State * L);
|
|
int setTextureScale(lua_State * L);
|
|
int getMass(lua_State * L);
|
|
int setMass(lua_State * L);
|
|
int getAABB(lua_State * L);
|
|
int getSize(lua_State * L);
|
|
}
|
|
|
|
namespace joint
|
|
{
|
|
int setAMotorAxis(lua_State * L);
|
|
int setAMotorNumAxes(lua_State * L);
|
|
int setAMotorAngle(lua_State * L);
|
|
int setAMotorLoStop(lua_State * L);
|
|
int setAMotorHiStop(lua_State * L);
|
|
int setAMotorVel(lua_State * L);
|
|
int setAMotorFMax(lua_State * L);
|
|
int setAMotorBounce(lua_State * L);
|
|
}
|
|
|
|
namespace sound
|
|
{
|
|
refptr<AV::Sound> getSound(lua_State * L, int index);
|
|
int play(lua_State * L);
|
|
int pause(lua_State * L);
|
|
int stop(lua_State * L);
|
|
int loop(lua_State * L);
|
|
int loopForever(lua_State * L);
|
|
}
|
|
}
|
|
|
|
#endif
|