From 2553dac942b9b5c3ad6b834d32c9053d3592faaf Mon Sep 17 00:00:00 2001 From: jacksonmj Date: Sun, 25 Dec 2011 07:44:00 +0800 Subject: [PATCH] Update can_move, recount menu items and clear graphics cache when tpt.el is changed --- includes/luaconsole.h | 7 ++++++- src/interface.c | 9 ++++++++- src/luaconsole.c | 28 +++++++++++++++++++++++++--- 3 files changed, 39 insertions(+), 5 deletions(-) diff --git a/includes/luaconsole.h b/includes/luaconsole.h index fc5e2c436..e55948269 100644 --- a/includes/luaconsole.h +++ b/includes/luaconsole.h @@ -19,6 +19,11 @@ #define LUACON_KDOWN 1 #define LUACON_KUP 2 +//Bitmasks for things that might need recalculating after changes to tpt.el +#define LUACON_EL_MODIFIED_CANMOVE 0x1 +#define LUACON_EL_MODIFIED_GRAPHICS 0x2 +#define LUACON_EL_MODIFIED_MENUS 0x4 + int *lua_el_func, *lua_el_mode; void luacon_open(); @@ -39,7 +44,7 @@ int luacon_transitionread(lua_State* l); int luacon_transitionwrite(lua_State* l); int luacon_particle_getproperty(char * key, int * format); int luacon_transition_getproperty(char * key, int * format); -int luacon_element_getproperty(char * key, int * format); +int luacon_element_getproperty(char * key, int * format, unsigned int * modified_stuff); int process_command_lua(pixel *vid_buf, char *console, char *console_error); int getPartIndex_curIdx; diff --git a/src/interface.c b/src/interface.c index 472fd9b29..f62bd5104 100644 --- a/src/interface.c +++ b/src/interface.c @@ -92,11 +92,18 @@ int drawgrav_enable = 0; void menu_count(void)//puts the number of elements in each section into .itemcount { int i=0; + for (i=0;i