mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-15 17:35:37 +02:00
Consolidate API object code (#12728)
Co-authored-by: sfan5 <sfan5@live.de>
This commit is contained in:
committed by
GitHub
parent
b21fb18379
commit
7632af3c73
@@ -31,7 +31,6 @@ class LuaPerlinNoise : public ModApiBase
|
||||
private:
|
||||
NoiseParams np;
|
||||
|
||||
static const char className[];
|
||||
static luaL_Reg methods[];
|
||||
|
||||
// Exported functions
|
||||
@@ -50,12 +49,12 @@ public:
|
||||
// Creates an LuaPerlinNoise and leaves it on top of stack
|
||||
static int create_object(lua_State *L);
|
||||
|
||||
static LuaPerlinNoise *checkobject(lua_State *L, int narg);
|
||||
|
||||
static void *packIn(lua_State *L, int idx);
|
||||
static void packOut(lua_State *L, void *ptr);
|
||||
|
||||
static void Register(lua_State *L);
|
||||
|
||||
static const char className[];
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -65,7 +64,6 @@ class LuaPerlinNoiseMap : public ModApiBase
|
||||
{
|
||||
Noise *noise;
|
||||
|
||||
static const char className[];
|
||||
static luaL_Reg methods[];
|
||||
|
||||
// Exported functions
|
||||
@@ -92,12 +90,12 @@ public:
|
||||
// Creates an LuaPerlinNoiseMap and leaves it on top of stack
|
||||
static int create_object(lua_State *L);
|
||||
|
||||
static LuaPerlinNoiseMap *checkobject(lua_State *L, int narg);
|
||||
|
||||
static void *packIn(lua_State *L, int idx);
|
||||
static void packOut(lua_State *L, void *ptr);
|
||||
|
||||
static void Register(lua_State *L);
|
||||
|
||||
static const char className[];
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -108,7 +106,6 @@ class LuaPseudoRandom : public ModApiBase
|
||||
private:
|
||||
PseudoRandom m_pseudo;
|
||||
|
||||
static const char className[];
|
||||
static const luaL_Reg methods[];
|
||||
|
||||
// Exported functions
|
||||
@@ -126,9 +123,9 @@ public:
|
||||
// Creates an LuaPseudoRandom and leaves it on top of stack
|
||||
static int create_object(lua_State *L);
|
||||
|
||||
static LuaPseudoRandom *checkobject(lua_State *L, int narg);
|
||||
|
||||
static void Register(lua_State *L);
|
||||
|
||||
static const char className[];
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -139,7 +136,6 @@ class LuaPcgRandom : public ModApiBase
|
||||
private:
|
||||
PcgRandom m_rnd;
|
||||
|
||||
static const char className[];
|
||||
static const luaL_Reg methods[];
|
||||
|
||||
// Exported functions
|
||||
@@ -162,9 +158,9 @@ public:
|
||||
// Creates an LuaPcgRandom and leaves it on top of stack
|
||||
static int create_object(lua_State *L);
|
||||
|
||||
static LuaPcgRandom *checkobject(lua_State *L, int narg);
|
||||
|
||||
static void Register(lua_State *L);
|
||||
|
||||
static const char className[];
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -174,7 +170,6 @@ class LuaSecureRandom : public ModApiBase
|
||||
{
|
||||
private:
|
||||
static const size_t RAND_BUF_SIZE = 2048;
|
||||
static const char className[];
|
||||
static const luaL_Reg methods[];
|
||||
|
||||
u32 m_rand_idx;
|
||||
@@ -195,7 +190,7 @@ public:
|
||||
// Creates an LuaSecureRandom and leaves it on top of stack
|
||||
static int create_object(lua_State *L);
|
||||
|
||||
static LuaSecureRandom *checkobject(lua_State *L, int narg);
|
||||
|
||||
static void Register(lua_State *L);
|
||||
|
||||
static const char className[];
|
||||
};
|
||||
|
Reference in New Issue
Block a user