The Battle for Wesnoth  1.17.0-dev
lua_rng.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014 - 2021
3  by Chris Beck <render787@gmail.com>
4  Part of the Battle for Wesnoth Project https://www.wesnoth.org/
5 
6  This program is free software; you can redistribute it and/or modify
7  it under the terms of the GNU General Public License as published by
8  the Free Software Foundation; either version 2 of the License, or
9  (at your option) any later version.
10  This program is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY.
12 
13  See the COPYING file for more details.
14 */
15 
16 #pragma once
17 
18 /**
19  * This namespace contains bindings for lua to hold a mt19937 object
20  * as userdata, draw from it, and do the automatic memory management
21  */
22 
23 struct lua_State;
24 
25 namespace lua_rng {
26 
27 /** Implementations for lua callbacks */
32 
33 /** Creates the metatable for RNG objects, and adds the Rng table which contains the constructor */
34 void load_tables(lua_State*);
35 
36 } // end namespace lua_rng
int impl_rng_destroy(lua_State *L)
Definition: lua_rng.cpp:48
int impl_rng_seed(lua_State *L)
Definition: lua_rng.cpp:62
int impl_rng_create(lua_State *L)
Implementations for lua callbacks.
Definition: lua_rng.cpp:39
int impl_rng_draw(lua_State *L)
Definition: lua_rng.cpp:71
void load_tables(lua_State *L)
Creates the metatable for RNG objects, and adds the Rng table which contains the constructor.
Definition: lua_rng.cpp:81