fuck the wrong branch. also, particle delete function.
This commit is contained in:
parent
295b384466
commit
bc8af4e210
BIN
build/powder
BIN
build/powder
Binary file not shown.
@ -9,15 +9,10 @@ int update_WATR(UPDATE_FUNC_ARGS) {
|
||||
r = pmap[y+ry][x+rx];
|
||||
if ((r>>8)>=NPART || !r)
|
||||
continue;
|
||||
/*if ((r&0xFF)==PT_SALT && 1>(rand()%250))
|
||||
if ((r&0xFF)==PT_SALT && 1>(rand()%250))
|
||||
{
|
||||
part_change_type(i,x,y,PT_SLTW);
|
||||
part_change_type(r>>8,x+rx,y+ry,PT_SLTW);
|
||||
}*/
|
||||
if ((r&0xFF)==PT_SALT)
|
||||
{
|
||||
parts[i].life = 100;
|
||||
kill_part(r>>8);
|
||||
}
|
||||
if (((r&0xFF)==PT_RBDM||(r&0xFF)==PT_LRBD) && (legacy_enable||parts[i].temp>(273.15f+12.0f)) && 1>(rand()%500))
|
||||
{
|
||||
|
@ -2913,12 +2913,6 @@ void draw_parts(pixel *vid)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (parts[i].type==PT_WATR){
|
||||
if(parts[i].life==0)
|
||||
blendpixel(vid,x+nx,y+ny,0,255,0,255);
|
||||
else
|
||||
blendpixel(vid,x+nx,y+ny,255,0,0,255);
|
||||
}
|
||||
}
|
||||
#ifdef OpenGL
|
||||
glFlush ();
|
||||
|
13
src/main.c
13
src/main.c
@ -1928,6 +1928,18 @@ emb_set_keyrepeat(PyObject *self, PyObject *args)
|
||||
return Py_BuildValue("i",SDL_EnableKeyRepeat(keydelay,keyinterval));
|
||||
}
|
||||
|
||||
//delete_part
|
||||
static PyObject*
|
||||
emb_delete(PyObject *self, PyObject *args)
|
||||
{
|
||||
////SDL_EnableKeyRepeat(delay,interval)
|
||||
int x,y;
|
||||
if(!PyArg_ParseTuple(args, "ii:delete",&x,&y))
|
||||
return NULL;
|
||||
delete_part(x,y);
|
||||
return Py_BuildValue("i",1);
|
||||
}
|
||||
|
||||
static PyMethodDef EmbMethods[] = { //WARNING! don't forget to register your function here!
|
||||
{"create", (PyCFunction)emb_create, METH_VARARGS|METH_KEYWORDS, "create a particle."},
|
||||
{"log", (PyCFunction)emb_log, METH_VARARGS, "logs an error string to the console."},
|
||||
@ -1964,6 +1976,7 @@ static PyMethodDef EmbMethods[] = { //WARNING! don't forget to register your fun
|
||||
{"shortcuts_enable", (PyCFunction)emb_shortcuts_enable, METH_VARARGS, "enable keyboard shortcuts"},
|
||||
{"get_modifier", (PyCFunction)emb_get_modifier, METH_VARARGS, "get pressed modifier keys"},
|
||||
{"set_keyrepeat", (PyCFunction)emb_set_keyrepeat, METH_VARARGS, "set key repeat rate."},
|
||||
{"delete", (PyCFunction)emb_delete, METH_VARARGS, "delete a particle"},
|
||||
{NULL, NULL, 0, NULL}
|
||||
};
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user