Recent

Author Topic: Box2d to convert into lazarus  (Read 8821 times)

tr_escape

  • Sr. Member
  • ****
  • Posts: 432
  • sector name toys | respect to spectre
    • Github:
Box2d to convert into lazarus
« on: May 18, 2015, 09:24:56 pm »
Hello everyone,

I just wonder is there any work about to convert box2d-delphi into lazarus.

I downloaded from

https://code.google.com/p/box2d-delphi/

and it is worked with Delphi XE3 but lazarus I didn't get success.

I changed some lines of code like as in uses block:

   // OpenGL,
   Gl,
   Glu,
   GLUT, 

or

floattotext functions and finally I can compile but I got a opengl32 dll error or something like. ( maybe glut32.dll )


Is there any idea?

I added my project files into attach.

It is already a delphi project but I deleted some files ( exe , .o )
« Last Edit: May 20, 2015, 07:23:54 am by tr_escape »

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Box2d to convert into lazarus
« Reply #1 on: May 19, 2015, 11:13:30 am »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

tr_escape

  • Sr. Member
  • ****
  • Posts: 432
  • sector name toys | respect to spectre
    • Github:
Re: Box2d to convert into lazarus
« Reply #2 on: May 20, 2015, 07:43:34 am »
I just wonder is there any work about to convert box2d-delphi into lazarus.
http://www.pilotlogic.com/sitejoom/index.php/forum/pl-box2d/1074-lab-box2d-libray-for-win32-and-win64

I think it wont work because lazarus not implement yet AllocateHWnd function:

Code: [Select]
function AllocateHWnd(Method: TWndMethod): HWND;
  begin
    { dummy }
    runerror(217);
    Result:=0;
  end;

Is there equivalent function in Lazarus/fpc?

Or

If I copy Delphi's function into Lazarus , is there a problem with copying rights?
« Last Edit: May 20, 2015, 07:56:04 am by tr_escape »

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Box2d to convert into lazarus
« Reply #3 on: May 20, 2015, 11:25:17 am »
I think it wont work because lazarus not implement yet AllocateHWnd function:
Well, since you didn't bother testing in neither Lazarus or Typhon, I won't bother explaining how can this Typhon package work in Lazarus (as shown in screenshot). Tested with Laz 1.5, FPC2.6.5.

Cheers!
« Last Edit: May 20, 2015, 11:27:18 am by avra »
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

tr_escape

  • Sr. Member
  • ****
  • Posts: 432
  • sector name toys | respect to spectre
    • Github:
Re: Box2d to convert into lazarus
« Reply #4 on: May 20, 2015, 11:57:05 am »
I think it wont work because lazarus not implement yet AllocateHWnd function:
Well, since you didn't bother testing in neither Lazarus or Typhon, I won't bother explaining how can this Typhon package work in Lazarus (as shown in screenshot). Tested with Laz 1.5, FPC2.6.5.

Cheers!

Could you please share your codes?

Best regards.

avra

  • Hero Member
  • *****
  • Posts: 2514
    • Additional info
Re: Box2d to convert into lazarus
« Reply #5 on: May 20, 2015, 12:30:56 pm »
Could you please share your codes?
Sorry, I don't like the way you don't appreciate my time, so I have decided not to share product of that time just for you. Maybe I got on wrong foot today, but that's the way it is. If you can not make it work with Lazarus yourself then use CodeTyphon version of Lazarus (Box2D works there out of the box), or wait until I make a module for fpcup when everyone else will be able to install it into Lazarus.
ct2laz - Conversion between Lazarus and CodeTyphon
bithelpers - Bit manipulation for standard types
pasettimino - Siemens S7 PLC lib

tr_escape

  • Sr. Member
  • ****
  • Posts: 432
  • sector name toys | respect to spectre
    • Github:
Re: Box2d to convert into lazarus
« Reply #6 on: May 20, 2015, 01:01:13 pm »
Could you please share your codes?
Sorry, I don't like the way you don't appreciate my time, so I have decided not to share product of that time just for you. Maybe I got on wrong foot today, but that's the way it is. If you can not make it work with Lazarus yourself then use CodeTyphon version of Lazarus (Box2D works there out of the box), or wait until I make a module for fpcup when everyone else will be able to install it into Lazarus.

Ok. There is no problem for your sharing idea...

I tried to install sophos found a threat that why I didn't install it. I have to install in a virtualbox first I think...

****************** Sophos Anti-Virus Log - 20.05.2015 10:59:39 **************

20150520 101426   On-access scanner has denied access to location "C:\codetyphon\binTools\win32\dllexp\dllexp.exe" for user NT AUTHORITY\SYSTEM
20150520 101456   File "C:\codetyphon\binTools\win32\dllexp\dllexp.exe" belongs to adware or PUA 'NirSoft' (of type 2).
20150520 101501   File "C:\codetyphon\binTools\win32\dllexp\dllexp.exe" has been cleaned up.
20150520 101502   Adware or PUA 'NirSoft' has been removed.
      (205 items)


tr_escape

  • Sr. Member
  • ****
  • Posts: 432
  • sector name toys | respect to spectre
    • Github:
Re: Box2d to convert into lazarus
« Reply #7 on: May 25, 2015, 08:54:56 pm »
Hello everyone,

I converted to lazarus box2d sample project. Ofcourse there are some problems but for development aim it can be use.

So you can download all sources and exe/dll files from sourceforge.net

https://sourceforge.net/projects/lazprojects/files/box2D_Lazarus/

It compiled by lazarus 1.4.0 for windows...

Some demo scenes in the attach.

 

TinyPortal © 2005-2018