summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorSimon Robertshaw <simon@hardwired.org.uk>2012-05-24 18:53:50 (GMT)
committer Simon Robertshaw <simon@hardwired.org.uk>2012-05-24 18:53:50 (GMT)
commit8196d2a645d386b5c97134c446e959e5e50a345b (patch)
tree33e729715a6122fa5b8dac6f9abf7b784bfbfbc3 /includes
parent5a117c2d27f513942d7621980a79d357af122ba4 (diff)
parent1fb778724329782bb5616da032742dce4dbea131 (diff)
downloadpowder-8196d2a645d386b5c97134c446e959e5e50a345b.zip
powder-8196d2a645d386b5c97134c446e959e5e50a345b.tar.gz
Merge pull request #66 from jacob1/Modstuff
Code structure improvements for graphics/drawing, improvements to prevent accidental infinite loops in Lua, Fixes for fusion, improvements for VOID types. And other minor improvements
Diffstat (limited to 'includes')
-rw-r--r--includes/defines.h9
-rw-r--r--includes/graphics.h4
-rw-r--r--includes/luaconsole.h5
-rw-r--r--includes/powdergraphics.h1
4 files changed, 9 insertions, 10 deletions
diff --git a/includes/defines.h b/includes/defines.h
index 28cdbd2..3008841 100644
--- a/includes/defines.h
+++ b/includes/defines.h
@@ -189,14 +189,7 @@ extern int ngrav_enable;
int limitFPS;
int water_equal_test;
extern int quickoptions_tooltip_fade;
-
-extern int debug_flags;
-#define DEBUG_PERF_FRAMECOUNT 256
-extern int debug_perf_istart;
-extern int debug_perf_iend;
-extern long debug_perf_frametime[DEBUG_PERF_FRAMECOUNT];
-extern long debug_perf_partitime[DEBUG_PERF_FRAMECOUNT];
-extern long debug_perf_time;
+extern int loop_time;
extern int debug_flags;
#define DEBUG_PERF_FRAMECOUNT 256
diff --git a/includes/graphics.h b/includes/graphics.h
index 22986a5..9860522 100644
--- a/includes/graphics.h
+++ b/includes/graphics.h
@@ -195,6 +195,10 @@ void blend_line(pixel *vid, int x1, int y1, int x2, int y2, int r, int g, int b,
void render_parts(pixel *vid);
+void render_before(pixel *part_vbuf);
+
+void render_after(pixel *part_vbuf, pixel *vid_buf);
+
#ifdef OGLR
void draw_parts_fbo();
#endif
diff --git a/includes/luaconsole.h b/includes/luaconsole.h
index 83fa405..b4e313b 100644
--- a/includes/luaconsole.h
+++ b/includes/luaconsole.h
@@ -40,7 +40,7 @@
#define LUACON_EL_MODIFIED_GRAPHICS 0x2
#define LUACON_EL_MODIFIED_MENUS 0x4
-int *lua_el_func, *lua_el_mode;
+int *lua_el_func, *lua_el_mode, *lua_gr_func;
void luacon_open();
int luacon_step(int mx, int my, int selectl, int selectr);
@@ -48,6 +48,7 @@ int luacon_mouseevent(int mx, int my, int mb, int event);
int luacon_keyevent(int key, int modifier, int event);
int luacon_eval(char *command);
int luacon_part_update(int t, int i, int x, int y, int surround_space, int nt);
+int luacon_graphics_update(int t, int i, int *pixel_mode, int *cola, int *colr, int *colg, int *colb, int *firea, int *firer, int *fireg, int *fireb);
char *luacon_geterror();
void luacon_close();
int luacon_partsread(lua_State* l);
@@ -62,6 +63,7 @@ int luacon_particle_getproperty(char * key, int * format);
int luacon_transition_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);
+void lua_hook(lua_State *L, lua_Debug *ar);
int getPartIndex_curIdx;
@@ -69,6 +71,7 @@ int getPartIndex_curIdx;
int luatpt_test(lua_State* l);
int luatpt_getelement(lua_State *l);
int luatpt_element_func(lua_State *l);
+int luatpt_graphics_func(lua_State *l);
int luatpt_drawtext(lua_State* l);
int luatpt_create(lua_State* l);
int luatpt_setpause(lua_State* l);
diff --git a/includes/powdergraphics.h b/includes/powdergraphics.h
index 66286c6..0abe06c 100644
--- a/includes/powdergraphics.h
+++ b/includes/powdergraphics.h
@@ -65,6 +65,5 @@
#define DISPLAY_AIR 0x0000000F
#define DISPLAY_WARP 0x00000010
#define DISPLAY_PERS 0x00000020
-#define DISPLAY_EFFE 0x00000040
#endif