100€ to the first person that makes it work!
100€ to the first person that makes it work!
This is my game project - Top Down City:
http://www.pascalgamedevelopment.com...y-Topic-Reboot
My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
http://www.pascalgamedevelopment.com...source+manager
Delfi, what your asking isn't any trivial thing, especially given what you have provided. Some questions follow:
Can you name the exact C/C++ files that you specifically need converted?
Are you sure you have the exports proper for the methods you are calling?
Can you give a SIMPLE sample that doesn't require hacking another project?
* 2D top down a rectangle that "drives" around and shows what your looking for. As simple as you can make it.
Update your RAR to include the latest source you have. No sense in us having to re-work your work by having to read/patch every reply.
If that seems like too much to ask, then put your request on any of the bounty sites and see what happens. You might also try some of the Borland (sorry, Code Gear) News Groups.
- Jeremy
http://www.eonclash.com/
Legolas: Perhaps, because i want to compile code on multiple platforms rather than just one i need to translate the code, rather than mess with c compiler and linking process on each platform?
I'll put up the whole thing by the end of day in some more comfortable codebase to whoever wants to mess with the code.
the translated header files btw work with the C dll (i don't think that includes fixed pascal dll header).
This is my game project - Top Down City:
http://www.pascalgamedevelopment.com...y-Topic-Reboot
My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
http://www.pascalgamedevelopment.com...source+manager
This is working older version which uses older dll version (it shows nice dynamics with proper physics constants tho)
http://www.gtatools.com/TDC/Developm...%20c%20dll.rar
This is delphi version, which uses C dll (works kinda, except the gearbox gear is always stuck in reverse)
http://www.gtatools.com/TDC/Developm...sing%20dll.rar
This is version using my (broken) translation of the dll code, this is what i'm trying to make work properly:
http://www.gtatools.com/TDC/Developm...ranslation.rar
Small hack to make glscene work with the models in demo apps:
http://www.gtatools.com/TDC/Developm...cene%20fix.rar
This is the dll source code (what i'm trying to translate), (requires parts of newton SDK examples code, translated c dll is there AS "TDC_RCV.pas", i think some records might be in rcv_records.pas):
http://www.gtatools.com/TDC/Developm...dll%20code.rar
any other questions? post here, or ask on msn (msn only: stdcall@volja.net)
This is my game project - Top Down City:
http://www.pascalgamedevelopment.com...y-Topic-Reboot
My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
http://www.pascalgamedevelopment.com...source+manager
So who's up the challenge?
This is my game project - Top Down City:
http://www.pascalgamedevelopment.com...y-Topic-Reboot
My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
http://www.pascalgamedevelopment.com...source+manager
I'd give it a go, but I need to find the time. too many things ont he go at the moment. Btw, not for the prize, as I have Delphi 1 somewhere.
save the money I looked at your pascal C header conversion and everything looks fine...possible problems are...bool<->boolean...in C++ sizeof(bool) is compiler-specific (doesn't have to be 1 byte), sizeof(enum_type) is also compiler-specific and can be minimum size required to express the enumeration or fixed 32/64 bits....basicly the problem should be in field size/alignment....also in the original C source there is no packing directive so it defaults to the default of the compiler used which can also cause problems...
err, what do you mean?? there is a problem in matrix math, the goal is to get the code translated into pascal and make it work, There is a bug in some math routines or some other code that i must have translated errorenous, i couldn't locate the error after 2 rewrites. I could use the c dll if i wanted to, and i can use it from delphi (see one of example apps) so that header has no byte alingment problem, but the one used in delphi translated project doesn't matter what alingment it has, since it is all native to delphi / fpc, isn't it?Originally Posted by Setharian
savage: there's now an additional 100€ award, not just copy of delphi 1.
This is my game project - Top Down City:
http://www.pascalgamedevelopment.com...y-Topic-Reboot
My OpenAL audio wrapper with Intelligent Source Manager to use unlimited:
http://www.pascalgamedevelopment.com...source+manager
Unless I am mistaken, this code:Originally Posted by fire.tiger
initialize counter with 0 the very first time it runs (as it is static), and from then on each time it is called counter will be incremented by 1.Code:void DriveTrainUpdate(TDriveTrain* pDTrain, float gas, int gear) { float fActiveRPM; static int counter = 0; counter += 1; float brakeCoef; // telemetry RCVehicle* pv = (RCVehicle*)pDTrain->pRcv; dFloat* ts = pv->fTimeSlice; int ofs = 45; PrintDebug("-DriveTrainUpdate [%d]-\n", counter);
With the pascal version below:
[pascal]procedure DriveTrainUpdate(var pDTrain: TDriveTrain; gas: single; gear: integer);
var
fActiveRPM: Single;
counter: Integer;
brakeCoef: Single;
pv: RCVehicle;
ts: TFriction;
ofs: Integer;
begin
counter := 0;
Inc(counter);
pv := pDTrain.pRcv;
ts := pv.fTimeSlice;
ofs := 45;[/pascal]
This will always make counter become equal to +1 each run...
this doesn't sound like the equivalent behavior at all...
perhaps you could try defining counter as (local to the procedure)
[pascal]Const
counter: Integer = 0;
[/pascal]
or
[pascal]Var
counter: Integer = 0;[/pascal]
counter may have to be a global constant/variable instead of local for it to work...you need to try both methods (local to the procedure first, then global) to see if they work for you.
Hope this helps,
cheers,
Paul.
Games:
Seafox
Pages:
Syntax Error Software itch.io page
Online Chess
http://gameknot.com/#paul_nicholls
Bookmarks