View Full Version : A3D nGine 2003 and Delphi5
Traveler
01-04-2003, 11:47 AM
First of all let me comment you with the engine,.. very impressive. The screenshots look very, very nice. :D
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...
detvog
01-04-2003, 12:17 PM
: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) :oops:
In the config.cfg delete the cameraXpos. (all)
You must convert all '.' to ',' in the *.shd files. 8)
When you make own bsp-files you must use the light as 0,0 and not 0.0 ect. :idea:
Traveler
01-04-2003, 03:40 PM
Thanks for the tip. It seems to work fine now :-)
detvog
01-04-2003, 04:18 PM
:D
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:
andygfx
03-04-2003, 06:53 AM
: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) :oops:
In the config.cfg delete the cameraXpos. (all)
You must convert all '.' to ',' in the *.shd files. 8)
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
detvog
03-04-2003, 09:30 AM
:P
Ahhh....that works better. OK Thanks :lol:
tobybear
03-04-2003, 10:20 AM
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
Traveler
03-04-2003, 10:26 AM
A good suggestion !! thanx :)
andygfx
03-04-2003, 10:57 AM
Wow. Thanks.
Philipp
01-06-2003, 01:03 AM
or something other... without setting the decimalseparator everytime...
// 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;
it checks which version of the decimalseparator is used in the string...
hth
regards,
philipp.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.