diff options
author | Bardur Arantsson <bardur@scientician.net> | 2015-03-07 16:55:41 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2015-03-07 16:55:41 +0100 |
commit | 05f1835fd9ec10fa3dd3c9962605e889ec0fc698 (patch) | |
tree | 29be9e6ea0daf4c4e3c88ed19e82cc570cd0cb96 | |
parent | e574b1a3941295190b6809efd18b33b80f8bd7a1 (diff) |
Move lua_bind.cc declarations to separate header file
-rw-r--r-- | src/cmd1.cc | 1 | ||||
-rw-r--r-- | src/cmd5.cc | 1 | ||||
-rw-r--r-- | src/dungeon.cc | 1 | ||||
-rw-r--r-- | src/externs.h | 24 | ||||
-rw-r--r-- | src/init2.cc | 1 | ||||
-rw-r--r-- | src/lua_bind.cc | 5 | ||||
-rw-r--r-- | src/lua_bind.hpp | 25 | ||||
-rw-r--r-- | src/modules.cc | 1 | ||||
-rw-r--r-- | src/q_fireprof.cc | 1 | ||||
-rw-r--r-- | src/q_library.cc | 1 | ||||
-rw-r--r-- | src/q_rand.cc | 1 | ||||
-rw-r--r-- | src/q_thrain.cc | 1 | ||||
-rw-r--r-- | src/skills.cc | 1 | ||||
-rw-r--r-- | src/spells3.cc | 1 | ||||
-rw-r--r-- | src/spells6.cc | 1 | ||||
-rw-r--r-- | src/squelch/condition_metadata.cc | 1 | ||||
-rw-r--r-- | src/squeltch.cc | 1 | ||||
-rw-r--r-- | tests/get_level_device.cc | 2 | ||||
-rw-r--r-- | tests/lua_get_level.cc | 1 |
19 files changed, 41 insertions, 30 deletions
diff --git a/src/cmd1.cc b/src/cmd1.cc index 8dff71b4..e5fa0a7f 100644 --- a/src/cmd1.cc +++ b/src/cmd1.cc @@ -15,6 +15,7 @@ #include "files.hpp" #include "gods.hpp" #include "hooks.h" +#include "lua_bind.hpp" #include "mimic.hpp" #include "monster2.hpp" #include "monster3.hpp" diff --git a/src/cmd5.cc b/src/cmd5.cc index ab103ff2..43357cef 100644 --- a/src/cmd5.cc +++ b/src/cmd5.cc @@ -12,6 +12,7 @@ #include "birth.hpp" #include "cave.hpp" #include "corrupt.hpp" +#include "lua_bind.hpp" #include "monster2.hpp" #include "object1.hpp" #include "object2.hpp" diff --git a/src/dungeon.cc b/src/dungeon.cc index b4a12438..a446e2da 100644 --- a/src/dungeon.cc +++ b/src/dungeon.cc @@ -31,6 +31,7 @@ #include "levels.hpp" #include "loadsave.h" #include "loadsave.hpp" +#include "lua_bind.hpp" #include "monster2.hpp" #include "monster3.hpp" #include "modules.hpp" diff --git a/src/externs.h b/src/externs.h index 9bade9d6..b2380840 100644 --- a/src/externs.h +++ b/src/externs.h @@ -501,27 +501,3 @@ extern void init_lua_init(void); /* modules.cc */ extern cptr force_module; - -/* lua_bind.c */ - -extern s32b lua_get_level(struct spell_type *spell, s32b lvl, s32b max, s32b min, s32b bonus); -extern int get_mana(s32b s); -extern s32b get_power(s32b s); -extern s32b get_level(s32b s, s32b max, s32b min); -extern void get_level_school(struct spell_type *spell, s32b max, s32b min, s32b *level, bool_ *na); - -extern s32b get_level_max_stick; -extern s32b get_level_use_stick; - -extern void get_map_size(const char *name, int *ysize, int *xsize); -extern void load_map(const char *name, int *y, int *x); - -extern char *lua_input_box(cptr title, int max); -extern char lua_msg_box(cptr title); - -extern void increase_mana(int delta); - -extern timer_type *TIMER_AGGRAVATE_EVIL; - -void timer_aggravate_evil_enable(); -void timer_aggravate_evil_callback(); diff --git a/src/init2.cc b/src/init2.cc index d43a0c6d..40c223ac 100644 --- a/src/init2.cc +++ b/src/init2.cc @@ -9,6 +9,7 @@ #include "gen_maze.hpp" #include "hooks.h" #include "init1.hpp" +#include "lua_bind.hpp" #include "messages.h" #include "modules.hpp" #include "quark.h" diff --git a/src/lua_bind.cc b/src/lua_bind.cc index f7d60bc5..e1b07c2f 100644 --- a/src/lua_bind.cc +++ b/src/lua_bind.cc @@ -1,7 +1,3 @@ -/* File: lua_bind.c */ - -/* Purpose: various lua bindings */ - /* * Copyright (c) 2001 DarkGod * @@ -11,6 +7,7 @@ */ #include "lua_bind.hpp" + #include "angband.h" #include "cmd7.hpp" #include "corrupt.hpp" diff --git a/src/lua_bind.hpp b/src/lua_bind.hpp index c65795fc..5117fcbe 100644 --- a/src/lua_bind.hpp +++ b/src/lua_bind.hpp @@ -1,10 +1,33 @@ #pragma once #include "h-basic.h" -#include "spell_type_fwd.hpp" +#include "types_fwd.h" /** Calculate spell failure rate for a device, i.e. a wand or staff. */ extern s32b spell_chance_device(spell_type *spell_ptr); /** Calculate spell failure rate for a spell book. */ extern s32b spell_chance_book(s32b s); + + +extern s32b lua_get_level(struct spell_type *spell, s32b lvl, s32b max, s32b min, s32b bonus); +extern int get_mana(s32b s); +extern s32b get_power(s32b s); +extern s32b get_level(s32b s, s32b max, s32b min); +extern void get_level_school(struct spell_type *spell, s32b max, s32b min, s32b *level, bool_ *na); + +extern s32b get_level_max_stick; +extern s32b get_level_use_stick; + +extern void get_map_size(const char *name, int *ysize, int *xsize); +extern void load_map(const char *name, int *y, int *x); + +extern char *lua_input_box(cptr title, int max); +extern char lua_msg_box(cptr title); + +extern void increase_mana(int delta); + +extern timer_type *TIMER_AGGRAVATE_EVIL; + +void timer_aggravate_evil_enable(); +void timer_aggravate_evil_callback(); diff --git a/src/modules.cc b/src/modules.cc index c60b0ef8..5fa9045c 100644 --- a/src/modules.cc +++ b/src/modules.cc @@ -12,6 +12,7 @@ #include "files.hpp" #include "hooks.h" #include "joke.hpp" +#include "lua_bind.hpp" #include "monster2.hpp" #include "object2.hpp" #include "spells2.hpp" diff --git a/src/q_fireprof.cc b/src/q_fireprof.cc index 0738a460..4e9dd659 100644 --- a/src/q_fireprof.cc +++ b/src/q_fireprof.cc @@ -1,6 +1,7 @@ #include "q_fireprof.h" #include "quark.h" #include "hooks.h" +#include "lua_bind.hpp" #include "object1.hpp" #include "object2.hpp" #include "traps.hpp" diff --git a/src/q_library.cc b/src/q_library.cc index d0ec2cc8..cb863a30 100644 --- a/src/q_library.cc +++ b/src/q_library.cc @@ -1,6 +1,7 @@ #include "q_library.h" #include "quark.h" #include "hooks.h" +#include "lua_bind.hpp" #include "monster2.hpp" #include "object2.hpp" #include "spells3.hpp" diff --git a/src/q_rand.cc b/src/q_rand.cc index a46c7fc6..175c08b0 100644 --- a/src/q_rand.cc +++ b/src/q_rand.cc @@ -4,6 +4,7 @@ #include "generate.hpp" #include "hooks.h" #include "init1.hpp" +#include "lua_bind.hpp" #include "messages.h" #include "monster2.hpp" #include "monster3.hpp" diff --git a/src/q_thrain.cc b/src/q_thrain.cc index 1407d746..496448a2 100644 --- a/src/q_thrain.cc +++ b/src/q_thrain.cc @@ -4,6 +4,7 @@ #include "generate.hpp" #include "hooks.h" #include "init1.hpp" +#include "lua_bind.hpp" #include "quark.h" #include "randart.hpp" #include "messages.h" diff --git a/src/skills.cc b/src/skills.cc index b7a94e17..0832f294 100644 --- a/src/skills.cc +++ b/src/skills.cc @@ -15,6 +15,7 @@ #include "gods.hpp" #include "help.hpp" #include "hooks.h" +#include "lua_bind.hpp" #include "monster2.hpp" #include "monster3.hpp" #include "object1.hpp" diff --git a/src/spells3.cc b/src/spells3.cc index ff61521f..ad60494f 100644 --- a/src/spells3.cc +++ b/src/spells3.cc @@ -3,6 +3,7 @@ #include "angband.h" #include "cave.hpp" #include "cmd5.hpp" +#include "lua_bind.hpp" #include "mimic.hpp" #include "monster2.hpp" #include "monster3.hpp" diff --git a/src/spells6.cc b/src/spells6.cc index ff4ae90e..2f2b0493 100644 --- a/src/spells6.cc +++ b/src/spells6.cc @@ -2,6 +2,7 @@ #include "angband.h" #include "gods.hpp" +#include "lua_bind.hpp" #include "object2.hpp" #include "skills.hpp" #include "spell_type.hpp" diff --git a/src/squelch/condition_metadata.cc b/src/squelch/condition_metadata.cc index 7011617a..187f833f 100644 --- a/src/squelch/condition_metadata.cc +++ b/src/squelch/condition_metadata.cc @@ -5,6 +5,7 @@ #include "tome/squelch/object_status.hpp" #include "angband.h" +#include "lua_bind.hpp" #include "skills.hpp" #include "util.hpp" #include "util.h" diff --git a/src/squeltch.cc b/src/squeltch.cc index dbd78317..594cd67c 100644 --- a/src/squeltch.cc +++ b/src/squeltch.cc @@ -11,6 +11,7 @@ #include "files.hpp" #include "loadsave.hpp" +#include "lua_bind.hpp" #include "object1.hpp" #include "object2.hpp" #include "tome/squelch/tree_printer.hpp" diff --git a/tests/get_level_device.cc b/tests/get_level_device.cc index a5a5afa9..95e51ad1 100644 --- a/tests/get_level_device.cc +++ b/tests/get_level_device.cc @@ -1,4 +1,4 @@ -#include "angband.h" +#include "lua_bind.hpp" #include "spell_type.hpp" #include <bandit/bandit.h> using namespace bandit; diff --git a/tests/lua_get_level.cc b/tests/lua_get_level.cc index 317fbe0e..a434903e 100644 --- a/tests/lua_get_level.cc +++ b/tests/lua_get_level.cc @@ -1,3 +1,4 @@ +#include "lua_bind.hpp" #include "spell_type.hpp" #include <bandit/bandit.h> using namespace bandit; |