soap lines show in nothing mode, some small changes to arguments for sim api drawing functions
This commit is contained in:
parent
81876a93a3
commit
ebe145b39f
@ -933,11 +933,7 @@ int LuaScriptInterface::simulation_createParts(lua_State * l)
|
|||||||
int ry = luaL_optint(l,4,5);
|
int ry = luaL_optint(l,4,5);
|
||||||
int c = luaL_optint(l,5,luacon_model->GetActiveTool(0)->GetToolID());
|
int c = luaL_optint(l,5,luacon_model->GetActiveTool(0)->GetToolID());
|
||||||
int brush = luaL_optint(l,6,CIRCLE_BRUSH);
|
int brush = luaL_optint(l,6,CIRCLE_BRUSH);
|
||||||
//int flags = luaL_optint(l,7,get_brush_flags());
|
int flags = luaL_optint(l,7,0);
|
||||||
/*if (x < 0 || x > XRES || y < 0 || y > YRES)
|
|
||||||
return luaL_error(l, "Coordinates out of range (%d,%d)", x, y);
|
|
||||||
if (c < 0 || c >= PT_NUM || !luacon_sim->elements[c].Enabled)
|
|
||||||
return luaL_error(l, "Unrecognised element number '%d'", c);*/
|
|
||||||
|
|
||||||
vector<Brush*> brushList = luacon_model->GetBrushList();
|
vector<Brush*> brushList = luacon_model->GetBrushList();
|
||||||
if (brush < 0 || brush > brushList.size())
|
if (brush < 0 || brush > brushList.size())
|
||||||
@ -961,13 +957,7 @@ int LuaScriptInterface::simulation_createLine(lua_State * l)
|
|||||||
int ry = luaL_optint(l,6,5);
|
int ry = luaL_optint(l,6,5);
|
||||||
int c = luaL_optint(l,7,luacon_model->GetActiveTool(0)->GetToolID());
|
int c = luaL_optint(l,7,luacon_model->GetActiveTool(0)->GetToolID());
|
||||||
int brush = luaL_optint(l,8,CIRCLE_BRUSH);
|
int brush = luaL_optint(l,8,CIRCLE_BRUSH);
|
||||||
//int flags = luaL_optint(l,9,get_brush_flags());
|
int flags = luaL_optint(l,9,0);
|
||||||
/* (x1 < 0 || x1 > XRES || y1 < 0 || y1 > YRES)
|
|
||||||
return luaL_error(l, "Starting coordinates out of range (%d,%d)", x1, y1);
|
|
||||||
if (x2 < 0 || x2 > XRES || y2 < 0 || y2 > YRES)
|
|
||||||
return luaL_error(l, "Ending Coordinates out of range (%d,%d)", x2, y2);
|
|
||||||
if (c < 0 || c >= PT_NUM || !luacon_sim->elements[c].Enabled)
|
|
||||||
return luaL_error(l, "Unrecognised element number '%d'", c);*/
|
|
||||||
|
|
||||||
vector<Brush*> brushList = luacon_model->GetBrushList();
|
vector<Brush*> brushList = luacon_model->GetBrushList();
|
||||||
if (brush < 0 || brush > brushList.size())
|
if (brush < 0 || brush > brushList.size())
|
||||||
@ -987,13 +977,7 @@ int LuaScriptInterface::simulation_createBox(lua_State * l)
|
|||||||
int x2 = luaL_optint(l,3,-1);
|
int x2 = luaL_optint(l,3,-1);
|
||||||
int y2 = luaL_optint(l,4,-1);
|
int y2 = luaL_optint(l,4,-1);
|
||||||
int c = luaL_optint(l,5,luacon_model->GetActiveTool(0)->GetToolID());
|
int c = luaL_optint(l,5,luacon_model->GetActiveTool(0)->GetToolID());
|
||||||
//int flags = luaL_optint(l,6,get_brush_flags());
|
int flags = luaL_optint(l,6,0);
|
||||||
/*if (x1 < 0 || x1 > XRES || y1 < 0 || y1 > YRES)
|
|
||||||
return luaL_error(l, "Starting coordinates out of range (%d,%d)", x1, y1);
|
|
||||||
if (x2 < 0 || x2 > XRES || y2 < 0 || y2 > YRES)
|
|
||||||
return luaL_error(l, "Ending Coordinates out of range (%d,%d)", x2, y2);
|
|
||||||
if (c < 0 || c >= PT_NUM || !luacon_sim->elements[c].Enabled)
|
|
||||||
return luaL_error(l, "Unrecognised element number '%d'", c);*/
|
|
||||||
|
|
||||||
luacon_sim->CreateBox(x1, y1, x2, y2, c, 0);
|
luacon_sim->CreateBox(x1, y1, x2, y2, c, 0);
|
||||||
return 0;
|
return 0;
|
||||||
@ -1006,11 +990,7 @@ int LuaScriptInterface::simulation_floodParts(lua_State * l)
|
|||||||
int c = luaL_optint(l,3,luacon_model->GetActiveTool(0)->GetToolID());
|
int c = luaL_optint(l,3,luacon_model->GetActiveTool(0)->GetToolID());
|
||||||
int cm = luaL_optint(l,4,-1);
|
int cm = luaL_optint(l,4,-1);
|
||||||
int bm = luaL_optint(l,5,-1);
|
int bm = luaL_optint(l,5,-1);
|
||||||
//int flags = luaL_optint(l,6,0);
|
int flags = luaL_optint(l,6,0);
|
||||||
/*if (x < 0 || x > XRES || y < 0 || y > YRES)
|
|
||||||
return luaL_error(l, "coordinates out of range (%d,%d)", x, y);
|
|
||||||
if ((c >= 0 && c < PT_NUM && !luacon_sim->elements[c].Enabled) || c < 0)
|
|
||||||
return luaL_error(l, "Unrecognised element number '%d'", c);*/
|
|
||||||
int ret = luacon_sim->FloodParts(x, y, c, cm, bm, 0);
|
int ret = luacon_sim->FloodParts(x, y, c, cm, bm, 0);
|
||||||
lua_pushinteger(l, ret);
|
lua_pushinteger(l, ret);
|
||||||
return 1;
|
return 1;
|
||||||
@ -1023,9 +1003,7 @@ int LuaScriptInterface::simulation_createWalls(lua_State * l)
|
|||||||
int rx = luaL_optint(l,3,0);
|
int rx = luaL_optint(l,3,0);
|
||||||
int ry = luaL_optint(l,4,0);
|
int ry = luaL_optint(l,4,0);
|
||||||
int c = luaL_optint(l,5,8);
|
int c = luaL_optint(l,5,8);
|
||||||
//int flags = luaL_optint(l,6,get_brush_flags());
|
int flags = luaL_optint(l,6,0);
|
||||||
if (x < 0 || x > XRES || y < 0 || y > YRES)
|
|
||||||
return luaL_error(l, "Coordinates out of range (%d,%d)", x, y);
|
|
||||||
if (c < 0 || c >= UI_WALLCOUNT)
|
if (c < 0 || c >= UI_WALLCOUNT)
|
||||||
return luaL_error(l, "Unrecognised wall id '%d'", c);
|
return luaL_error(l, "Unrecognised wall id '%d'", c);
|
||||||
|
|
||||||
@ -1043,11 +1021,7 @@ int LuaScriptInterface::simulation_createWallLine(lua_State * l)
|
|||||||
int rx = luaL_optint(l,5,0);
|
int rx = luaL_optint(l,5,0);
|
||||||
int ry = luaL_optint(l,6,0);
|
int ry = luaL_optint(l,6,0);
|
||||||
int c = luaL_optint(l,7,8);
|
int c = luaL_optint(l,7,8);
|
||||||
//int flags = luaL_optint(l,8,get_brush_flags());
|
int flags = luaL_optint(l,8,0);
|
||||||
if (x1 < 0 || x1 > XRES || y1 < 0 || y1 > YRES)
|
|
||||||
return luaL_error(l, "Starting coordinates out of range (%d,%d)", x1, y1);
|
|
||||||
if (x2 < 0 || x2 > XRES || y2 < 0 || y2 > YRES)
|
|
||||||
return luaL_error(l, "Ending Coordinates out of range (%d,%d)", x2, y2);
|
|
||||||
if (c < 0 || c >= UI_WALLCOUNT)
|
if (c < 0 || c >= UI_WALLCOUNT)
|
||||||
return luaL_error(l, "Unrecognised wall id '%d'", c);
|
return luaL_error(l, "Unrecognised wall id '%d'", c);
|
||||||
|
|
||||||
@ -1062,11 +1036,7 @@ int LuaScriptInterface::simulation_createWallBox(lua_State * l)
|
|||||||
int x2 = luaL_optint(l,3,-1);
|
int x2 = luaL_optint(l,3,-1);
|
||||||
int y2 = luaL_optint(l,4,-1);
|
int y2 = luaL_optint(l,4,-1);
|
||||||
int c = luaL_optint(l,5,8);
|
int c = luaL_optint(l,5,8);
|
||||||
//int flags = luaL_optint(l,6,get_brush_flags());
|
int flags = luaL_optint(l,6,0);
|
||||||
if (x1 < 0 || x1 > XRES || y1 < 0 || y1 > YRES)
|
|
||||||
return luaL_error(l, "Starting coordinates out of range (%d,%d)", x1, y1);
|
|
||||||
if (x2 < 0 || x2 > XRES || y2 < 0 || y2 > YRES)
|
|
||||||
return luaL_error(l, "Ending Coordinates out of range (%d,%d)", x2, y2);
|
|
||||||
if (c < 0 || c >= UI_WALLCOUNT)
|
if (c < 0 || c >= UI_WALLCOUNT)
|
||||||
return luaL_error(l, "Unrecognised wall id '%d'", c);
|
return luaL_error(l, "Unrecognised wall id '%d'", c);
|
||||||
|
|
||||||
@ -1081,9 +1051,7 @@ int LuaScriptInterface::simulation_floodWalls(lua_State * l)
|
|||||||
int c = luaL_optint(l,3,8);
|
int c = luaL_optint(l,3,8);
|
||||||
int cm = luaL_optint(l,4,-1);
|
int cm = luaL_optint(l,4,-1);
|
||||||
int bm = luaL_optint(l,5,-1);
|
int bm = luaL_optint(l,5,-1);
|
||||||
//int flags = luaL_optint(l,6,0);
|
int flags = luaL_optint(l,6,0);
|
||||||
if (x < 0 || x > XRES || y < 0 || y > YRES)
|
|
||||||
return luaL_error(l, "coordinates out of range (%d,%d)", x, y);
|
|
||||||
if (c < 0 || c >= UI_WALLCOUNT)
|
if (c < 0 || c >= UI_WALLCOUNT)
|
||||||
return luaL_error(l, "Unrecognised wall id '%d'", c);
|
return luaL_error(l, "Unrecognised wall id '%d'", c);
|
||||||
int ret = luacon_sim->FloodWalls(x, y, c, cm, bm, 0);
|
int ret = luacon_sim->FloodWalls(x, y, c, cm, bm, 0);
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
#define RENDER_GLOW OPTIONS | PSPEC_STICKMAN | /*PMODE_FLAT |*/ PMODE_GLOW | PMODE_ADD | PMODE_BLEND
|
#define RENDER_GLOW OPTIONS | PSPEC_STICKMAN | /*PMODE_FLAT |*/ PMODE_GLOW | PMODE_ADD | PMODE_BLEND
|
||||||
#define RENDER_BLUR OPTIONS | PSPEC_STICKMAN | /*PMODE_FLAT |*/ PMODE_BLUR | PMODE_ADD | PMODE_BLEND
|
#define RENDER_BLUR OPTIONS | PSPEC_STICKMAN | /*PMODE_FLAT |*/ PMODE_BLUR | PMODE_ADD | PMODE_BLEND
|
||||||
#define RENDER_BLOB OPTIONS | PSPEC_STICKMAN | /*PMODE_FLAT |*/ PMODE_BLOB | PMODE_ADD | PMODE_BLEND
|
#define RENDER_BLOB OPTIONS | PSPEC_STICKMAN | /*PMODE_FLAT |*/ PMODE_BLOB | PMODE_ADD | PMODE_BLEND
|
||||||
#define RENDER_BASC OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_ADD | PMODE_BLEND
|
#define RENDER_BASC OPTIONS | PSPEC_STICKMAN | PMODE_FLAT | PMODE_ADD | PMODE_BLEND | EFFECT_LINES
|
||||||
#define RENDER_NONE OPTIONS | PSPEC_STICKMAN | PMODE_FLAT
|
#define RENDER_NONE OPTIONS | PSPEC_STICKMAN | PMODE_FLAT
|
||||||
|
|
||||||
#define COLOUR_HEAT 0x00000001
|
#define COLOUR_HEAT 0x00000001
|
||||||
|
@ -139,7 +139,6 @@ public:
|
|||||||
int flood_water(int x, int y, int i, int originaly, int check);
|
int flood_water(int x, int y, int i, int originaly, int check);
|
||||||
TPT_NO_INLINE void detach(int i);
|
TPT_NO_INLINE void detach(int i);
|
||||||
TPT_NO_INLINE void part_change_type(int i, int x, int y, int t);
|
TPT_NO_INLINE void part_change_type(int i, int x, int y, int t);
|
||||||
TPT_NO_INLINE int create_part_add_props(int p, int x, int y, int tv, int rx, int ry);
|
|
||||||
//int InCurrentBrush(int i, int j, int rx, int ry);
|
//int InCurrentBrush(int i, int j, int rx, int ry);
|
||||||
//int get_brush_flags();
|
//int get_brush_flags();
|
||||||
TPT_NO_INLINE int create_part(int p, int x, int y, int t);
|
TPT_NO_INLINE int create_part(int p, int x, int y, int t);
|
||||||
@ -170,8 +169,9 @@ public:
|
|||||||
int CreateParts(int positionX, int positionY, int c, Brush * cBrush);
|
int CreateParts(int positionX, int positionY, int c, Brush * cBrush);
|
||||||
//Old particle creation, will create a crappy square, do not use
|
//Old particle creation, will create a crappy square, do not use
|
||||||
int CreateParts(int x, int y, int rx, int ry, int c, int flags);
|
int CreateParts(int x, int y, int rx, int ry, int c, int flags);
|
||||||
|
int CreatePartFlags(int x, int y, int c, int fn, int flags);
|
||||||
void CreateLine(int x1, int y1, int x2, int y2, int c, Brush * cBrush);
|
void CreateLine(int x1, int y1, int x2, int y2, int c, Brush * cBrush);
|
||||||
void CreateLine(int x1, int y1, int x2, int y2, int rx, int ry, int c, int flags);
|
void CreateLine(int x1, int y1, int x2, int y2, int c);
|
||||||
|
|
||||||
void CreateWallBox(int x1, int y1, int x2, int y2, int c, int flags);
|
void CreateWallBox(int x1, int y1, int x2, int y2, int c, int flags);
|
||||||
int FloodWalls(int x, int y, int c, int cm, int bm, int flags);
|
int FloodWalls(int x, int y, int c, int cm, int bm, int flags);
|
||||||
|
@ -117,6 +117,7 @@ int Element_BIZR::graphics(GRAPHICS_FUNC_ARGS)
|
|||||||
*firer = *colr/5 * fabs(cpart->vx)+fabs(cpart->vy);
|
*firer = *colr/5 * fabs(cpart->vx)+fabs(cpart->vy);
|
||||||
*pixel_mode |= FIRE_ADD;
|
*pixel_mode |= FIRE_ADD;
|
||||||
}
|
}
|
||||||
|
*pixel_mode |= PMODE_BLUR;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -246,7 +246,7 @@ int Element_SOAP::update(UPDATE_FUNC_ARGS)
|
|||||||
int Element_SOAP::graphics(GRAPHICS_FUNC_ARGS)
|
int Element_SOAP::graphics(GRAPHICS_FUNC_ARGS)
|
||||||
|
|
||||||
{
|
{
|
||||||
*pixel_mode |= EFFECT_LINES;
|
*pixel_mode |= EFFECT_LINES|PMODE_BLUR;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user