diff options
| author | cracker64 <cracker642@gmail.com> | 2012-07-08 04:00:47 (GMT) |
|---|---|---|
| committer | cracker64 <cracker642@gmail.com> | 2012-07-08 04:00:47 (GMT) |
| commit | e7035233fd6fda5599512a6c588e32ace134024b (patch) | |
| tree | eafc8542e1382822aac06862a855bd8265662678 /src/main.c | |
| parent | 5f3c10a6844aa2196258aa52448c8f753edb8439 (diff) | |
| download | powder-e7035233fd6fda5599512a6c588e32ace134024b.zip powder-e7035233fd6fda5599512a6c588e32ace134024b.tar.gz | |
Optimization for GoL, Added brush size and mouse wheel to lua!
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 18 |
1 files changed, 11 insertions, 7 deletions
@@ -1778,7 +1778,7 @@ int main(int argc, char *argv[]) if (ZSIZE<2) ZSIZE = 2; ZFACTOR = 256/ZSIZE; - sdl_wheel = 0; + //sdl_wheel = 0; } else //change brush size { @@ -1803,7 +1803,7 @@ int main(int argc, char *argv[]) bsy = 1180; if (bsy<0) bsy = 0; - sdl_wheel = 0; + //sdl_wheel = 0; /*if(su >= PT_NUM) { if(sl < PT_NUM) su = sl; @@ -1818,23 +1818,27 @@ int main(int argc, char *argv[]) #ifdef LUACONSOLE if(bc && bq){ - if(!luacon_mouseevent(x, y, bc, LUACON_MPRESS)){ + if(!luacon_mouseevent(x, y, bc, LUACON_MPRESS, sdl_wheel)){ b = 0; } } else if(bc && !bq){ - if(!luacon_mouseevent(x, y, bc, LUACON_MDOWN)){ + if(!luacon_mouseevent(x, y, bc, LUACON_MDOWN, sdl_wheel)){ b = 0; } } else if(!bc && bq){ - if(!luacon_mouseevent(x, y, bq, LUACON_MUP)){ + if(!luacon_mouseevent(x, y, bq, LUACON_MUP, sdl_wheel)){ b = 0; } } - luacon_step(x, y,sl,sr); + else if (sdl_wheel){ + luacon_mouseevent(x, y, bq, 0, sdl_wheel); + } + + luacon_step(x, y,sl,sr,bsx,bsy); #endif - + sdl_wheel = 0; quickoptions_menu(vid_buf, b, bq, x, y); for (i=0; i<SC_TOTAL; i++)//draw all the menu sections |
