naev 0.11.5
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"
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:178
void spfxL_setSpeedVolume(double v)
Sets the speed volume due to autonav and the likes.
Definition nlua_spfx.c:563
void spfxL_renderbg(double dt)
Renders the Lua SPFX on the background.
Definition nlua_spfx.c:738
void spfxL_rendermg(double dt)
Renders the Lua SPFX in the midground.
Definition nlua_spfx.c:746
void spfxL_renderfg(double dt)
Renders the Lua SPFX in the foreground.
Definition nlua_spfx.c:754
void spfxL_clear(void)
Clears the Lua spfx.
Definition nlua_spfx.c:608
void spfxL_update(double dt)
Updates the spfx.
Definition nlua_spfx.c:632
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:132
int nlua_loadSpfx(nlua_env env)
Loads the spfx library.
Definition nlua_spfx.c:108
LuaSpfx_t * lua_pushspfx(lua_State *L, LuaSpfx_t spfx)
Pushes a spfx on the stack.
Definition nlua_spfx.c:163
void spfxL_setSpeed(double s)
Sets the speed of the playing spfx sounds.
Definition nlua_spfx.c:533
LuaSpfx_t * lua_tospfx(lua_State *L, int ind)
Gets spfx at index.
Definition nlua_spfx.c:121