move magic out of kernel, into src.

clean up/remove a ton of includes, especially of types.h (include in header if you need it, not in every .c file).
This commit is contained in:
Enno Rehling 2014-11-01 12:57:01 +01:00
parent 81bfb598d0
commit 1af315ebf2
66 changed files with 26 additions and 76 deletions

View File

@ -83,6 +83,7 @@ set (ERESSEA_SRC
give.c
items.c
laws.c
magic.c
market.c
monster.c
randenc.c
@ -166,6 +167,7 @@ set(TESTS_SRC
json.test.c
keyword.test.c
laws.test.c
magic.test.c
market.test.c
move.test.c
skill.test.c

View File

@ -26,7 +26,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <kernel/faction.h>
#include <kernel/messages.h>
#include <kernel/build.h>
#include <kernel/magic.h>
#include <kernel/region.h>
#include <kernel/pool.h>
#include <kernel/race.h>

View File

@ -17,7 +17,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
**/
#include <platform.h>
#include <kernel/types.h>
#include "alliance.h"
#include <kernel/save.h>

View File

@ -32,7 +32,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <kernel/faction.h>
#include <kernel/group.h>
#include <kernel/item.h>
#include <kernel/magic.h>
#include <kernel/messages.h>
#include <kernel/order.h>
#include <kernel/plane.h>

View File

@ -18,6 +18,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef H_KRNL_BATTLE
#define H_KRNL_BATTLE
#include <kernel/types.h>
#ifdef __cplusplus
extern "C" {
#endif

View File

@ -1,4 +1,3 @@
#include <kernel/types.h>
#include <platform.h>
#include "battle.h"

View File

@ -1,7 +1,6 @@
#include "bind_config.h"
#include <platform.h>
#include <kernel/types.h>
#include <kernel/jsonconf.h>
#include <util/log.h>
#include <util/language.h>

View File

@ -5,7 +5,6 @@
#include "json.h"
#include <kernel/faction.h>
#include <kernel/types.h>
#include <kernel/config.h>
#include <kernel/save.h>

View File

@ -11,7 +11,6 @@ without prior permission by the authors of Eressea.
*/
#include <platform.h>
#include <kernel/types.h>
#include "bind_faction.h"
#include "bind_unit.h"
#include "bindings.h"

View File

@ -1,6 +1,5 @@
#include <platform.h>
#include <curses.h>
#include <kernel/types.h>
#include "bind_gmtool.h"
#include "gmtool.h"

View File

@ -1,10 +1,8 @@
#include <platform.h>
#include <kernel/types.h>
#include "spells/shipcurse.h"
#include <kernel/equipment.h>
#include <kernel/faction.h>
#include <kernel/magic.h>
#include <kernel/race.h>
#include <kernel/ship.h>
#include <kernel/spellbook.h>

View File

@ -1,21 +1,20 @@
#include "bind_process.h"
#include <platform.h>
#include <kernel/types.h>
#include <kernel/alliance.h>
#include <kernel/config.h>
#include <kernel/magic.h>
#include <kernel/order.h>
#include <kernel/region.h>
#include <kernel/terrain.h>
#include <kernel/unit.h>
#include "battle.h"
#include "move.h"
#include "economy.h"
#include "laws.h"
#include "market.h"
#include "study.h"
#include "keyword.h"
#include "laws.h"
#include "magic.h"
#include "market.h"
#include "move.h"
#include "study.h"
#define PROC_LAND_REGION 0x0001
#define PROC_LONG_ORDER 0x0002

View File

@ -1,7 +1,6 @@
#include "bind_settings.h"
#include <platform.h>
#include <kernel/types.h>
#include <kernel/config.h>
const char * settings_get(const char *key)

View File

@ -11,7 +11,6 @@ without prior permission by the authors of Eressea.
*/
#include <platform.h>
#include <kernel/types.h>
#include "bind_ship.h"
#include "bind_unit.h"

View File

@ -12,7 +12,6 @@ without prior permission by the authors of Eressea.
#include <platform.h>
#include <kernel/config.h>
#include <kernel/types.h>
#include "bind_storage.h"
#include <kernel/save.h>

View File

@ -11,7 +11,6 @@ without prior permission by the authors of Eressea.
*/
#include <platform.h>
#include <kernel/types.h>
#include "bind_unit.h"
#ifdef BSON_ATTRIB
@ -31,7 +30,6 @@ without prior permission by the authors of Eressea.
#include <kernel/faction.h>
#include <kernel/group.h>
#include <kernel/item.h>
#include <kernel/magic.h>
#include <kernel/messages.h>
#include <kernel/order.h>
#include <kernel/pool.h>

View File

@ -11,7 +11,6 @@ without prior permission by the authors of Eressea.
*/
#include <platform.h>
#include <kernel/types.h>
#include "bindings.h"
#include "bind_unit.h"
#include "bind_storage.h"

View File

@ -26,7 +26,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <kernel/build.h>
#include <kernel/faction.h>
#include <kernel/item.h>
#include <kernel/magic.h>
#include <kernel/plane.h>
#include <kernel/race.h>
#include <kernel/region.h>

View File

@ -1,5 +1,4 @@
#include <platform.h>
#include <kernel/types.h>
#include "direction.h"
#include "tests.h"

View File

@ -19,7 +19,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <platform.h>
#include <kernel/config.h>
#include <kernel/types.h>
#include "economy.h"
#include "alchemy.h"
@ -38,7 +37,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <kernel/equipment.h>
#include <kernel/faction.h>
#include <kernel/item.h>
#include <kernel/magic.h>
#include <kernel/messages.h>
#include <kernel/order.h>
#include <kernel/plane.h>

View File

@ -1,6 +1,5 @@
#include <platform.h>
#include <kernel/config.h>
#include <kernel/types.h>
#include "economy.h"
#include <util/message.h>

View File

@ -20,7 +20,6 @@
#include <kernel/curse.h>
#include <kernel/faction.h>
#include <kernel/item.h>
#include <kernel/magic.h>
#include <kernel/messages.h>
#include <kernel/order.h>
#include <kernel/pool.h>

View File

@ -4,12 +4,12 @@
#include "study.h"
#include "move.h"
#include "magic.h"
#include <kernel/curse.h>
#include <kernel/building.h>
#include <kernel/faction.h>
#include <kernel/item.h>
#include <kernel/magic.h>
#include <kernel/messages.h>
#include <kernel/order.h>
#include <kernel/plane.h>

View File

@ -29,7 +29,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <kernel/save.h>
#include <kernel/curse.h>
#include <kernel/messages.h>
#include <kernel/magic.h>
#include <kernel/ship.h>
/* util includes */

View File

@ -20,6 +20,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <kernel/config.h>
#include "xerewards.h"
#include "magic.h"
/* kernel includes */
#include <kernel/item.h>
#include <kernel/region.h>
@ -27,7 +29,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <kernel/unit.h>
#include <kernel/curse.h>
#include <kernel/messages.h>
#include <kernel/magic.h>
#include <kernel/pool.h>
/* util includes */

View File

@ -3,7 +3,6 @@
#include "json.h"
#include <kernel/types.h>
#include <kernel/plane.h>
#include <kernel/region.h>
#include <kernel/faction.h>

View File

@ -3,7 +3,6 @@
#include <stream.h>
#include <memstream.h>
#include <kernel/types.h>
#include <kernel/region.h>
#include <kernel/terrain.h>

View File

@ -11,7 +11,6 @@ ship.test.c
spell.test.c
ally.test.c
building.test.c
magic.test.c
equipment.test.c
curse.test.c
item.test.c
@ -37,7 +36,6 @@ equipment.c
faction.c
group.c
item.c
magic.c
messages.c
order.c
pathfinder.c

View File

@ -34,7 +34,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <kernel/faction.h>
#include <kernel/group.h>
#include <kernel/item.h>
#include <kernel/magic.h>
#include <kernel/messages.h>
#include <kernel/order.h>
#include <kernel/pool.h>

View File

@ -1,7 +1,6 @@
#include <platform.h>
#include <kernel/config.h>
#include <kernel/types.h>
#include <kernel/race.h>
#include <kernel/region.h>
#include <kernel/building.h>

View File

@ -1,10 +1,10 @@
#include <platform.h>
#include <kernel/types.h>
#include "magic.h"
#include <kernel/equipment.h>
#include <kernel/item.h>
#include <kernel/unit.h>
#include <kernel/magic.h>
#include <kernel/spell.h>
#include <quicklist.h>

View File

@ -2,7 +2,6 @@
#include <kernel/ally.h>
#include <kernel/faction.h>
#include <kernel/types.h>
#include <kernel/race.h>
#include <kernel/region.h>
#include <kernel/config.h>

View File

@ -1,6 +1,5 @@
#include <platform.h>
#include <kernel/types.h>
#include <kernel/item.h>
#include <kernel/pool.h>
#include <kernel/unit.h>

View File

@ -1,5 +1,4 @@
#include <platform.h>
#include <kernel/types.h>
#include "ally.h"
#include "pool.h"

View File

@ -1,7 +1,6 @@
#include <platform.h>
#include <kernel/config.h>
#include <kernel/types.h>
#include <kernel/race.h>
#include <kernel/region.h>
#include <kernel/ship.h>

View File

@ -1,7 +1,6 @@
#include <platform.h>
#include <quicklist.h>
#include <kernel/types.h>
#include <kernel/spell.h>
#include <CuTest.h>

View File

@ -1,7 +1,5 @@
#include <platform.h>
#include <kernel/types.h>
#include <kernel/magic.h>
#include <kernel/spell.h>
#include <kernel/spellbook.h>
#include <quicklist.h>

View File

@ -18,7 +18,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <platform.h>
#include <kernel/config.h>
#include <kernel/types.h>
#include "unit.h"
#include "building.h"

View File

@ -1,5 +1,4 @@
#include <platform.h>
#include "kernel/types.h"
#include "kernel/config.h"
#include "kernel/order.h"
#include "keyword.h"

View File

@ -45,7 +45,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <kernel/faction.h>
#include <kernel/group.h>
#include <kernel/item.h>
#include <kernel/magic.h>
#include <kernel/messages.h>
#include <kernel/order.h>
#include <kernel/plane.h>

View File

@ -1,5 +1,4 @@
#include <platform.h>
#include <kernel/types.h>
#include "laws.h"
#include <kernel/ally.h>

View File

@ -19,7 +19,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <platform.h>
#include <kernel/config.h>
#include <kernel/types.h>
#include "magic.h"
#include "skill.h"

View File

@ -18,6 +18,9 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifndef H_KRNL_MAGIC
#define H_KRNL_MAGIC
#include <kernel/types.h>
#ifdef __cplusplus
extern "C" {
#endif

View File

@ -1,9 +1,9 @@
#include <platform.h>
#include <kernel/types.h>
#include "magic.h"
#include <kernel/faction.h>
#include <kernel/item.h>
#include <kernel/magic.h>
#include <kernel/region.h>
#include <kernel/spell.h>
#include <kernel/spellbook.h>

View File

@ -20,7 +20,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <util/log.h>
#include <kernel/config.h>
#include <kernel/types.h>
#include <kernel/save.h>
#include <kernel/version.h>
#include "eressea.h"

View File

@ -1,5 +1,4 @@
#include <platform.h>
#include <kernel/types.h>
#include "market.h"
#include "tests.h"

View File

@ -32,7 +32,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <kernel/building.h>
#include <kernel/faction.h>
#include <kernel/item.h>
#include <kernel/magic.h>
#include <kernel/messages.h>
#include <kernel/order.h>
#include <kernel/plane.h>

View File

@ -26,7 +26,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <kernel/building.h>
#include <kernel/faction.h>
#include <kernel/item.h>
#include <kernel/magic.h>
#include <kernel/race.h>
#include <kernel/region.h>
#include <kernel/ship.h>

View File

@ -32,7 +32,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <kernel/curse.h>
#include <kernel/faction.h>
#include <kernel/item.h>
#include <kernel/magic.h>
#include <kernel/messages.h>
#include <kernel/order.h>
#include <kernel/plane.h>

View File

@ -1,4 +1,3 @@
#include <kernel/types.h>
#include <platform.h>
#include <stdlib.h>
#include "move.h"

View File

@ -24,7 +24,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <kernel/unit.h>
#include <kernel/region.h>
#include <kernel/faction.h>
#include <kernel/magic.h>
#include <kernel/race.h>
#include <kernel/terrain.h>
#include <kernel/terrainid.h>

View File

@ -31,7 +31,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <kernel/equipment.h>
#include <kernel/faction.h>
#include <kernel/item.h>
#include <kernel/magic.h>
#include <kernel/messages.h>
#include <kernel/order.h>
#include <kernel/plane.h>

View File

@ -21,6 +21,7 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <time.h>
#include <kernel/objtypes.h>
#include <kernel/types.h>
#ifdef __cplusplus
extern "C" {

View File

@ -1,5 +1,4 @@
#include <config.h>
#include <kernel/types.h>
#include "reports.h"
#include <kernel/building.h>

View File

@ -1,5 +1,4 @@
#include <platform.h>
#include "kernel/types.h"
#include "skill.h"
#include "util/language.h"
#include "tests.h"

View File

@ -13,7 +13,6 @@
*/
#include <platform.h>
#include <kernel/types.h>
#include <kernel/config.h>
#include "spy.h"
@ -38,7 +37,6 @@
#include <kernel/spellid.h>
#include <kernel/faction.h>
#include <kernel/item.h>
#include <kernel/magic.h>
#include <kernel/messages.h>
#include <kernel/objtypes.h>
#include <kernel/order.h>

View File

@ -17,7 +17,6 @@
#include <kernel/curse.h>
#include <kernel/faction.h>
#include <kernel/magic.h>
#include <kernel/messages.h>
#include <kernel/race.h>
#include <kernel/region.h>

View File

@ -1,5 +1,4 @@
#include <platform.h>
#include <kernel/types.h>
#include "borders.h"

View File

@ -11,7 +11,6 @@
*/
#include <platform.h>
#include <kernel/config.h>
#include <kernel/types.h>
#include "combatspells.h"
/* kernel includes */
@ -20,7 +19,6 @@
#include <kernel/curse.h>
#include <kernel/faction.h>
#include <kernel/item.h>
#include <kernel/magic.h>
#include <kernel/messages.h>
#include <kernel/order.h>
#include <kernel/race.h>

View File

@ -14,10 +14,10 @@
#include <platform.h>
#include <kernel/config.h>
#include "regioncurse.h"
#include "magic.h"
/* kernel includes */
#include <kernel/curse.h>
#include <kernel/magic.h>
#include <kernel/messages.h>
#include <kernel/objtypes.h>
#include <kernel/region.h>

View File

@ -26,7 +26,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
/* kernel includes */
#include <kernel/item.h>
#include <kernel/faction.h>
#include <kernel/magic.h>
#include <kernel/messages.h>
#include <kernel/order.h>
#include <kernel/race.h>

View File

@ -29,7 +29,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <kernel/curse.h>
#include <kernel/faction.h>
#include <kernel/item.h>
#include <kernel/magic.h>
#include <kernel/messages.h>
#include <kernel/order.h>
#include <kernel/plane.h>

View File

@ -1,5 +1,4 @@
#include <platform.h>
#include <kernel/types.h>
#include "tests.h"
#include "keyword.h"

View File

@ -20,9 +20,10 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <kernel/config.h>
#include "clonedied.h"
#include "magic.h"
/* kernel includes */
#include <kernel/spell.h>
#include <kernel/magic.h>
#include <kernel/unit.h>
/* util includes */

View File

@ -20,10 +20,11 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <kernel/config.h>
#include "shock.h"
#include "magic.h"
/* kernel includes */
#include <kernel/curse.h>
#include <kernel/faction.h>
#include <kernel/magic.h>
#include <kernel/messages.h>
#include <kernel/spell.h>
#include <kernel/unit.h>

View File

@ -1,7 +1,6 @@
#include <platform.h>
#include "upkeep.h"
#include <kernel/types.h>
#include <kernel/faction.h>
#include <kernel/config.h>
#include <kernel/item.h>