naev 0.12.5
nlua_jump.h
1/*
2 * See Licensing and Copyright notice in naev.h
3 */
4#pragma once
5
6#include "nlua.h"
7#include "space.h"
8
9#define JUMP_METATABLE "jump"
10
14typedef struct LuaJump_s {
15 int srcid;
16 int destid;
17} LuaJump;
18
19/*
20 * Load the jump library.
21 */
22int nlua_loadJump( nlua_env env );
23
24/*
25 * Jump operations.
26 */
27LuaJump *lua_tojump( lua_State *L, int ind );
28LuaJump *luaL_checkjump( lua_State *L, int ind );
29LuaJump *lua_pushjump( lua_State *L, LuaJump jump );
30JumpPoint *luaL_validjump( lua_State *L, int ind );
31int lua_isjump( lua_State *L, int ind );
LuaJump * luaL_checkjump(lua_State *L, int ind)
Gets jump at index raising an error if isn't a jump.
Definition nlua_jump.c:106
LuaJump * lua_pushjump(lua_State *L, LuaJump jump)
Pushes a jump on the stack.
Definition nlua_jump.c:186
int nlua_loadJump(nlua_env env)
Loads the jump library.
Definition nlua_jump.c:68
JumpPoint * luaL_validjump(lua_State *L, int ind)
Gets a jump directly.
Definition nlua_jump.c:174
int lua_isjump(lua_State *L, int ind)
Checks to see if ind is a jump.
Definition nlua_jump.c:202
LuaJump * lua_tojump(lua_State *L, int ind)
This module allows you to handle the jumps from Lua.
Definition nlua_jump.c:95
Lua jump Wrapper.
Definition nlua_jump.h:14
int destid
Definition nlua_jump.h:16
int srcid
Definition nlua_jump.h:15