/* RETURN-value explenation 1 = Swap 0 = No move/Bounce 2 = Both particles occupy the same space. */ int eval_move(int pt, int nx, int ny, unsigned *rr) { unsigned r;
if (nx<0 || ny<0 || nx>=XRES || ny>=YRES) return 0;
r = pmap[ny][nx]; if (r && (r>>8) r = (r&~0xFF) | parts[r>>8].type; if (rr) *rr = r;
if ((r&0xFF)==PT_VOID || (r&0xFF)==PT_BHOL) return 1;