diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-04-09 20:59:23 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-04-09 21:00:56 +0200 |
commit | c14f382bb54811eeeeef9df8d455e6b770acd795 (patch) | |
tree | 57da24116a88ca32a3840dfc899cc456ca16b4c5 /src | |
parent | 293365ee62d199fc90c33eece8a8a3ffe6726d8a (diff) |
Lua: Remove quest.pkg
Diffstat (limited to 'src')
-rw-r--r-- | src/CMakeLists.txt | 3 | ||||
-rw-r--r-- | src/externs.h | 2 | ||||
-rw-r--r-- | src/lua_bind.c | 9 | ||||
-rw-r--r-- | src/quest.pkg | 121 | ||||
-rw-r--r-- | src/script.c | 2 |
5 files changed, 1 insertions, 136 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a453e573..f8a0b24f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -19,7 +19,7 @@ SET(SRCS wizard2.c init2.c birth.c wizard1.c init1.c main.c # Lua bits: lua_bind.c script.c w_mnster.c w_player.c w_play_c.c w_z_pack.c - w_obj.c w_util.c w_spells.c w_quest.c w_dun.c + w_obj.c w_util.c w_spells.c w_dun.c ) # Need a few additional source files for Windows. @@ -58,7 +58,6 @@ TOLUA_FILE(z_pack w_z_pack.c) TOLUA_FILE(object w_obj.c) TOLUA_FILE(util w_util.c) TOLUA_FILE(spells w_spells.c) -TOLUA_FILE(quest w_quest.c) TOLUA_FILE(dungeon w_dun.c) # tome executable diff --git a/src/externs.h b/src/externs.h index bb92e921..6c13aa27 100644 --- a/src/externs.h +++ b/src/externs.h @@ -1795,8 +1795,6 @@ extern void find_position(int y, int x, int *yy, int *xx); extern bool_ summon_lua_okay(int r_idx); extern bool_ lua_summon_monster(int y, int x, int lev, bool_ ffriend, char *fct); -extern void desc_quest(int q_idx, int d, char *desc); - extern s16b add_new_gods(char *name); extern void desc_god(int g_idx, int d, char *desc); extern int get_lua_int(cptr name); diff --git a/src/lua_bind.c b/src/lua_bind.c index ce49a06e..ff6680be 100644 --- a/src/lua_bind.c +++ b/src/lua_bind.c @@ -152,15 +152,6 @@ bool_ lua_summon_monster(int y, int x, int lev, bool_ friend_, char *fct) } /* - * Quests - */ -void desc_quest(int q_idx, int d, char *desc) -{ - if (d >= 0 && d < 10) - strncpy(quest[q_idx].desc[d], desc, 79); -} - -/* * Misc */ bool_ get_com_lua(cptr prompt, int *com) diff --git a/src/quest.pkg b/src/quest.pkg deleted file mode 100644 index aed3569a..00000000 --- a/src/quest.pkg +++ /dev/null @@ -1,121 +0,0 @@ -/* File: quest.pkg */ - -/* - * Purpose: Lua interface definitions for quests. - * To be processed by tolua to generate C source code. - */ - -$#include "angband.h" - -/** @typedef cptr - * @note String - */ -typedef char* cptr; - -/** @typedef errr - * @note Number - */ -typedef int errr; - -/** @typedef bool - * @note Boolean - */ -typedef unsigned char bool; - -/** @typedef byte - * @note Number - */ -typedef unsigned char byte; - -/** @typedef s16b - * @note Number - */ -typedef signed short s16b; - -/** @typedef u16b - * @note Number - */ -typedef unsigned short u16b; - -/** @typedef s32b - * @note Number - */ -typedef signed int s32b; - -/** @typedef u32b - * @note Number - */ -typedef unsigned int u32b; - -/** @name Quest Status Flags - * @brief Quest status - * @{ */ - -/** @def QUEST_STATUS_IGNORED */ -#define QUEST_STATUS_IGNORED -1 - -/** @def QUEST_STATUS_UNTAKEN */ -#define QUEST_STATUS_UNTAKEN 0 - -/** @def QUEST_STATUS_TAKEN */ -#define QUEST_STATUS_TAKEN 1 - -/** @def QUEST_STATUS_COMPLETED */ -#define QUEST_STATUS_COMPLETED 2 - -/** @def QUEST_STATUS_REWARDED */ -#define QUEST_STATUS_REWARDED 3 - -/** @def QUEST_STATUS_FAILED */ -#define QUEST_STATUS_FAILED 4 - -/** @def QUEST_STATUS_FINISHED */ -#define QUEST_STATUS_FINISHED 5 - -/** @def QUEST_STATUS_FAILED_DONE */ -#define QUEST_STATUS_FAILED_DONE 6 -/** @} */ - -#define MAX_Q_IDX 30 - -/** @struct quest_type - * @brief Quest - */ -struct quest_type -{ - /** @structvar silent - * @brief Boolean - * @note Does quest appear on quest list? - */ - bool silent; - - /** @structvar status - * @brief Number - * @note Is the quest taken, completed, finished? - */ - s16b status; - - /** @structvar level - * @brief Number - * @note Dungeon level - */ - s16b level; -}; - -/** @var quest_aux; - * @brief quest_type - * @note Array of quests - */ -extern quest_type quest[MAX_Q_IDX] @ quest_aux; - -$static quest_type *lua_get_quest(int q_idx){return &quest[q_idx];} - -/** @fn quest(int q_idx); - * @brief Return quest with index "q_idx" from quest array.\n - * @param q_idx Number \n the index of a quest in the quest array. - * @brief Quest index - * @return quest_type \n The quest at index "q_idx". - * @note (see file w_quest.c) - */ -static quest_type *lua_get_quest @ quest(int q_idx); - diff --git a/src/script.c b/src/script.c index a5aba3fb..c9979c17 100644 --- a/src/script.c +++ b/src/script.c @@ -24,7 +24,6 @@ int tolua_util_open (lua_State *L); int tolua_z_pack_open (lua_State *L); int tolua_object_open (lua_State *L); int tolua_spells_open (lua_State *L); -int tolua_quest_open (lua_State *L); int tolua_dungeon_open (lua_State *L); /* @@ -217,7 +216,6 @@ void init_lua() tolua_object_open(L); tolua_monster_open(L); tolua_spells_open(L); - tolua_quest_open(L); tolua_dungeon_open(L); } |