porting as3 physics

im trying to port over oimo physics https://github.com/saharan/OimoPhysics
to c++ im having many problems.
i figured instead of posting bunch of questions here i could have you guys look thru the code and tell me some of the MANY errors i have.

http://pastebin.com/raw/kAjTt4wa

im just asking for some pointers on things i need to fix, any help is greatly appreciated.
Holy smokes!

The first thing I notice is that there's a significant amount of variables with names like var0, var1, var2 that are applied to code like
1
2
3
var0 = foo0 + bar0;
var1 = foo1 + bar1;
var2 = foo2 + bar2;
That's an indication that you should be using arrays and loops. It seems to be that the code could be made roughly 9 times shorter.
I also see a lot of linear-algebra-looking code that hasn't been encapsulated in classes, further inflating the line count.

Personally, I wouldn't bother working with this. I'd just rewrite it from scratch.
Last edited on
Topic archived. No new replies allowed.