naev 0.12.6
nlua_spfx.h
1/*
2 * See Licensing and Copyright notice in naev.h
3 */
4#pragma once
5
6#include "nlua.h"
7
8#define SPFX_METATABLE "spfx"
9
10typedef int LuaSpfx_t;
11
12/*
13 * Library loading
14 */
15int nlua_loadSpfx( nlua_env env );
16
17/* Basic operations. */
18LuaSpfx_t *lua_tospfx( lua_State *L, int ind );
19LuaSpfx_t *luaL_checkspfx( lua_State *L, int ind );
20LuaSpfx_t *lua_pushspfx( lua_State *L, LuaSpfx_t spfx );
21int lua_isspfx( lua_State *L, int ind );
22
23/* Global stuff. */
24void spfxL_clear( void );
25void spfxL_exit( void );
26void spfxL_setSpeed( double s );
27void spfxL_setSpeedVolume( double v );
28void spfxL_update( double dt );
29void spfxL_renderbg( double dt );
30void spfxL_rendermg( double dt );
31void spfxL_renderfg( double dt );
int lua_isspfx(lua_State *L, int ind)
Checks to see if ind is a spfx.
Definition nlua_spfx.c:185
void spfxL_setSpeedVolume(double v)
Sets the speed volume due to autonav and the likes.
Definition nlua_spfx.c:590
void spfxL_renderbg(double dt)
Renders the Lua SPFX on the background.
Definition nlua_spfx.c:778
void spfxL_rendermg(double dt)
Renders the Lua SPFX in the midground.
Definition nlua_spfx.c:788
void spfxL_renderfg(double dt)
Renders the Lua SPFX in the foreground.
Definition nlua_spfx.c:798
void spfxL_clear(void)
Clears the Lua spfx.
Definition nlua_spfx.c:636
void spfxL_update(double dt)
Updates the spfx.
Definition nlua_spfx.c:661
LuaSpfx_t * luaL_checkspfx(lua_State *L, int ind)
Gets spfx at index or raises error if there is no spfx at index.
Definition nlua_spfx.c:137
int nlua_loadSpfx(nlua_env env)
Loads the spfx library.
Definition nlua_spfx.c:113
LuaSpfx_t * lua_pushspfx(lua_State *L, LuaSpfx_t spfx)
Pushes a spfx on the stack.
Definition nlua_spfx.c:170
void spfxL_setSpeed(double s)
Sets the speed of the playing spfx sounds.
Definition nlua_spfx.c:560
LuaSpfx_t * lua_tospfx(lua_State *L, int ind)
Gets spfx at index.
Definition nlua_spfx.c:126