deltaluca / nape

Haxe/AS3 Physics Engine
http://napephys.com
Other
542 stars 77 forks source link

flib don't patch .swc compiled for haxe3 and new nape #75

Closed andrew-git closed 10 years ago

andrew-git commented 10 years ago

Could you update flib (sources and binaries) for newest versions of nape and haxe3?

Thanks

deltaluca commented 10 years ago

Could you elaborate?

andrew-git commented 10 years ago

I compile swc from nape haxe sources from haxelib with command (haxe 3.0.0/3.0.1, nape 2.0.13/2.0.11): haxe -cp src -dce full --macro "include('nape')" --macro "include('zpp_nape')" -D nape_swc -D flib -swf nape_dev.swc -swf-version 11 then I patch swc with flib: neko flib.n nape_dev.swc

When I try to use swc in as3 project I got error debug.display is null etc (if I use debug.get_display() it's ok);

I compare your swc and my: In yours: public static function get STATIC():BodyType My: public static var STATIC:BodyType; public static function get_STATIC():BodyType

Then I try to use haxe2 and nape m10,1-r2 with command: haxe2\haxe.exe -cp src --macro "include('nape')" --macro "include('zpp_nape')" -D swc -D flib -swf nape_dev2.swc -swf-version 10 Then patch with flib: neko2\neko.exe flib.n nape_dev2.swc

It has both BodyType.STATIC and BodyType.get_STATIC in autocomplete, but works.

flib_windows.n from https://github.com/deltaluca/flib/tree/master/bin

Probably I miss something.

Thanks!

profelis commented 10 years ago

steps

1) haxelib install nape 2) create empty Main.hx 3) build swc with nape

-cp src
-lib nape
-swf bin/nape.swc
-swf-header 800:600:30:FFFFFF
--flash-strict
-swf-version 10.0
-main Main

-dce full
--macro "include('nape')"
--macro "include('zpp_nape')"
#-D flib
-D nape_swc
-D NAPE_RELEASE_BUILD

4) git clone https://github.com/deltaluca/flib.git 5) neko flib_windows.n bin/nape.swc 6) nape.swc still contains get_length methods

deltaluca commented 10 years ago

the pre-compiled flib_windows/flib_unix were quite out of date.

I've made the required changes to get flib to compile under haxe 3 and rebuilt them, could you check the results to see if they're functional?

andrew-git commented 10 years ago

Works great! Thanks a lot Luca!

profelis commented 10 years ago

:+1: