You could try replacing divisions by constants by multiplications by stored reciprocals and generally tidying up the code if you want it to run faster. e.g.

* 1024 / 10 -> * 102.4

You use division by 1024 a lot so storing 1/1024 once and multiplying by that instead might improve fps

Instead of using functions called SinTable and CosTable you could use actual lookup tables... sin and cos are both slow. Or rename your functions because its confusing :P

Comments don't hurt too...