Results 1 to 10 of 10

Thread: A3D nGine 2003 and Delphi5

  1. #1

    A3D nGine 2003 and Delphi5

    First of all let me comment you with the engine,.. very impressive. The screenshots look very, very nice.

    I have tried compiling the console_template and the panel_template, but sofar without results.

    Delphi didn't recognize variants so I removed it. It also complained about control3d.joystick.effects properties control3d.keyboard.effects properties and control3d.mouse.effects properties, which I ignored.

    It then complained about this line in the file a3d_vectormath:
    "if (isnan(angle)) then". I have removed it for the moment.

    Everything seemed to work, but then an exception was raised with the message "0.5 is not a valid floating point value". It seemed to occur in the A3D_Initialize procedure.

    I'm stuck at this point.
    I have tried changing this
    GLScreen_Clear(0.5, 0.5, 0.5, 0);
    into
    GLScreen_Clear(1, 1, 1, 0);
    but it didn't work.

    Any thoughts on how to fix this? I would be very grateful...

  2. #2

    A3D nGine 2003 and Delphi5

    :roll:
    Hello, i have the same problems but all my files works fine.
    I use Delphi 6 - personal version.

    (A,hhh, my english is not good-sorry) ops:

    In the config.cfg delete the cameraXpos. (all)
    You must convert all '.' to ',' in the *.shd files.
    When you make own bsp-files you must use the light as 0,0 and not 0.0 ect. :idea:

  3. #3

    A3D nGine 2003 and Delphi5

    Thanks for the tip. It seems to work fine now :-)

  4. #4

    A3D nGine 2003 and Delphi5


    When you convert the '.' to ',' in the config.cfg the cameras work.

    I have convert it and it works. :lol:





    I'am searching a collisions routine for the q3bps-demo under A3D. :cry:

  5. #5

    A3D nGine 2003 and Delphi5

    Quote Originally Posted by detvog
    :roll:
    Hello, i have the same problems but all my files works fine.
    I use Delphi 6 - personal version.

    (A,hhh, my english is not good-sorry) ops:

    In the config.cfg delete the cameraXpos. (all)
    You must convert all '.' to ',' in the *.shd files.
    When you make own bsp-files you must use the light as 0,0 and not 0.0 ect. :idea:
    This way is incorrect. Best way is set dot separator in Regional setting from control panel
    Set your language, then open Numbers and change [,] to [.] ... thats all
    C2D X6800, 4GBRAM, NV8800GTX, Vista x64 Ultimate

  6. #6

    A3D nGine 2003 and Delphi5


    Ahhh....that works better. OK Thanks :lol:

  7. #7

    A3D nGine 2003 and Delphi5

    This "blabla is not a floating point value" is quite a common problem for Delphi running on Windows systems where the "," is the decimal separator instead of the usual ".", like for example in Germany.

    There are at least 3 solutions to the problem:

    1. replace all possible occurences of 'x.y' to 'x,y' -> tedious and lots of work!
    2. go to Windows control panel, language/regional settings, change decimal separator
    from ',' to '.' -> very easy, should work on all Windows versions!
    3. The best solution: add the following Delphi line in the constructor of your unit/project:
    decimalseparator:='.';
    Delphi will then behave correctly and interpret "x.y" as a floating point number and will no longer throw an exception.
    And would definitely be a good idea for developers to include the above line in their projects to make them work on non-'.'-based systems as well...

    Regards,

    Toby

    www.tobybear.de

  8. #8

    A3D nGine 2003 and Delphi5

    A good suggestion !! thanx

  9. #9

    A3D nGine 2003 and Delphi5

    Wow. Thanks.
    C2D X6800, 4GBRAM, NV8800GTX, Vista x64 Ultimate

  10. #10

    A3D nGine 2003 and Delphi5

    or something other... without setting the decimalseparator everytime...

    [pascal]
    // newstrtofloat
    //
    function NewStrToFloat(Str : string) : single;
    var
    I : integer;
    Separators : set of char;

    begin
    Separators := ['.', ','];
    for I := 0 to Length(Str) do begin
    if Str[I] in Separators then
    Str[I] := DecimalSeparator;
    end;
    Result := StrToFloat(Str);
    end;
    [/pascal]

    it checks which version of the decimalseparator is used in the string...

    hth

    regards,
    philipp.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Comodo SSL