diff options
-rw-r--r-- | src/externs.h | 18 | ||||
-rw-r--r-- | src/lua_bind.c | 82 | ||||
-rw-r--r-- | src/types.h | 9 |
3 files changed, 0 insertions, 109 deletions
diff --git a/src/externs.h b/src/externs.h index 86127f25..4a1b64d4 100644 --- a/src/externs.h +++ b/src/externs.h @@ -2331,22 +2331,12 @@ extern int find_module(cptr name); /* lua_bind.c */ extern s16b can_spell_random(s16b spell_idx); -extern magic_power *grab_magic_power(magic_power *m_ptr, int num); extern bool_ get_magic_power(int *sn, magic_power *powers, int max_powers, void (*power_info)(char *p, int power), int plev, int cast_stat); -extern object_type *new_object(void); -extern void end_object(object_type *o_ptr); -extern void lua_set_item_tester(int tval, char *fct); -extern char *lua_object_desc(object_type *o_ptr, int pref, int mode); - extern s16b add_new_power(cptr name, cptr desc, cptr gain, cptr lose, byte level, byte cost, byte stat, byte diff); extern void find_position(int y, int x, int *yy, int *xx); -extern s16b add_new_gods(char *name); - -extern bool_ get_com_lua(cptr promtp, int *com); - extern s32b lua_get_level(spell_type *spell, s32b lvl, s32b max, s32b min, s32b bonus); extern s32b get_level_device(s32b s, s32b max, s32b min); extern int get_mana(s32b s); @@ -2360,25 +2350,17 @@ extern s32b lua_spell_device_chance(s32b chance, int level, int base_level); extern s32b get_level_max_stick; extern s32b get_level_use_stick; -extern cave_type *lua_get_cave(int y, int x); extern void set_target(int y, int x); extern void get_target(int dir, int *y, int *x); extern void get_map_size(char *name, int *ysize, int *xsize); extern void load_map(char *name, int *y, int *x); -extern bool_ alloc_room(int by0, int bx0, int ysize, int xsize, int *y1, int *x1, int *y2, int *x2); - -extern void lua_print_hook(cptr str); extern int lua_get_new_bounty_monster(int lev); extern char *lua_input_box(cptr title, int max); extern char lua_msg_box(cptr title); -extern list_type *lua_create_list(int size); -extern void lua_delete_list(list_type *, int size); -extern void lua_add_to_list(list_type *, int idx, cptr str); - extern void increase_mana(int delta); extern timer_type *TIMER_AGGRAVATE_EVIL; diff --git a/src/lua_bind.c b/src/lua_bind.c index 076404cf..dd7acede 100644 --- a/src/lua_bind.c +++ b/src/lua_bind.c @@ -18,34 +18,6 @@ s16b can_spell_random(s16b spell_idx) return spell_at(spell_idx)->random_type; } -magic_power *grab_magic_power(magic_power *m_ptr, int num) -{ - return (&m_ptr[num]); -} - -/* - * Create objects - */ -object_type *new_object() -{ - object_type *o_ptr; - MAKE(o_ptr, object_type); - return (o_ptr); -} - -void end_object(object_type *o_ptr) -{ - FREE(o_ptr, object_type); -} - -char *lua_object_desc(object_type *o_ptr, int pref, int mode) -{ - static char buf[150]; - - object_desc(buf, o_ptr, pref, mode); - return (buf); -} - /* * Monsters */ @@ -64,19 +36,6 @@ void find_position(int y, int x, int *yy, int *xx) /* * Misc */ -bool_ get_com_lua(cptr prompt, int *com) -{ - char c; - - if (!get_com(prompt, &c)) return (FALSE); - *com = c; - return (TRUE); -} - -school_type *grab_school_type(s16b num) -{ - return (&schools[num]); -} /* Change this fct if I want to switch to learnable spells */ s32b lua_get_level(spell_type *spell, s32b lvl, s32b max, s32b min, s32b bonus) @@ -217,12 +176,6 @@ s32b lua_spell_device_chance(s32b chance, int level, int base_level) return clamp_failure_chance(chance, minfail); } -/* Cave */ -cave_type *lua_get_cave(int y, int x) -{ - return (&(cave[y][x])); -} - void set_target(int y, int x) { target_who = -1; @@ -269,41 +222,6 @@ void load_map(char *name, int *y, int *x) process_dungeon_file(name, y, x, cur_hgt, cur_wid, TRUE, TRUE); } -bool_ alloc_room(int by0, int bx0, int ysize, int xsize, int *y1, int *x1, int *y2, int *x2) -{ - int xval, yval, x, y; - - /* Try to allocate space for room. If fails, exit */ - if (!room_alloc(xsize + 2, ysize + 2, FALSE, by0, bx0, &xval, &yval)) return FALSE; - - /* Get corner values */ - *y1 = yval - ysize / 2; - *x1 = xval - xsize / 2; - *y2 = yval + (ysize) / 2; - *x2 = xval + (xsize) / 2; - - /* Place a full floor under the room */ - for (y = *y1 - 1; y <= *y2 + 1; y++) - { - for (x = *x1 - 1; x <= *x2 + 1; x++) - { - cave_type *c_ptr = &cave[y][x]; - cave_set_feat(y, x, floor_type[rand_int(100)]); - c_ptr->info |= (CAVE_ROOM); - c_ptr->info |= (CAVE_GLOW); - } - } - return TRUE; -} - - -/* Files */ -void lua_print_hook(cptr str) -{ - fprintf(hook_file, "%s", str); -} - - /* * Finds a good random bounty monster * Im too lazy to write it in lua since the lua API for monsters is not very well yet diff --git a/src/types.h b/src/types.h index cb6d8e73..825e25ab 100644 --- a/src/types.h +++ b/src/types.h @@ -2711,15 +2711,6 @@ struct timer_type }; /* - * This is for lua functions that need to pass table to c functions - */ -typedef struct list_type list_type; -struct list_type -{ - cptr *list; -}; - -/* * Abilities */ typedef struct ability_type ability_type; |