Colin
admin
Posts
928
Threads
49
Location
Bulgaria
Post #1305
2012-12-28 20:13:52 UTC
See post above, this is something like how it is done, it works currently like this. But still that is not the best way to do it.
else you can automate the var
inline procedure asD($x) {
double d = $x;
$return $d;
}
myProc(asD(1.5), asD(5.2));
which maybe next update i will add direct casting
myProc((double)1.5, (double)5.2);
i will see :)
EDIT: actually i'm working on a solution right now, check back in 10-15 mins :)
Colin
admin
Posts
928
Threads
49
Location
Bulgaria
Post #1306
2012-12-28 21:15:27 UTC
OK it is complete, re-download from the beta link
debugMB_Single(0, 2.6);
debugMB_Double(0, 2.6);
debugMB_Extended(0, 2.6);
the assembler will check for floats the parameter type and push in respect to the size, no more probs :)
Emil_halim
member
Posts
639
Threads
104
Location
Alex, Egypt
Post #1307
2012-12-28 21:28:08 UTC
thank you very much Mr Colin.
i know you are making a hard work so thanks again.
please do not forget the optional parameters.
http://www.freewebs.com/ogremagic/index.htm
Colin
admin
Posts
928
Threads
49
Location
Bulgaria
Post #1308
2012-12-28 22:01:12 UTC
DONE ;)
check the beta download again.
Emil_halim
member
Posts
639
Threads
104
Location
Alex, Egypt
Post #1309
2012-12-28 22:09:22 UTC
ok thanks.
but got that error
[30,71]: Expected = but found ; in [testprg.zir]
Code:
function DB_LoadAnimation=('_DB_LoadAnimation@8')(int32 AnimIndex; char* Filename):boolean; stdcall; this was working well with previous releases.
http://www.freewebs.com/ogremagic/index.htm
Colin
admin
Posts
928
Threads
49
Location
Bulgaria
Post #1310
2012-12-28 22:13:43 UTC
OK check back in 5 mins will check this prob out :)
checked and tried this line but it compiles without error, it is possible it is displaying wrong line of code (a recent problem of Ziron 1 code structure)
the error is most likely somewhere else, can you paste your import block?
Emil_halim
member
Posts
639
Threads
104
Location
Alex, Egypt
Post #1311
2012-12-28 22:20:51 UTC
here it is
imports('MagicPro.dll')
{
procedure z_init = ('_z_init@4')(char* Titel); stdcall;
procedure Graphics3D = ('_Graphics3D@20')(Dword Width,Height,depth; boolean fullScrn,VSync); stdcall;
procedure z_setAmbientLight = ('_z_setAmbientLight@12')(single red,green,blue); stdcall;
procedure setMediaDir = ('_setMediaDir@8')(char* name;boolean recursive); stdcall;
function OIS_isKeyDown = ('_OIS_isKeyDown@4')(int32 key): boolean; stdcall;
procedure RenderWorld = ('_RenderWorld@4')(single timeSinceLastFrame=0.0); stdcall;
procedure Sync =('_Sync@0')(); stdcall;
procedure EndGraphics = ('_EndGraphics@0')(); stdcall;
function DB_LoadAnimation=('_DB_LoadAnimation@8')(int32 AnimIndex; char* Filename):boolean; stdcall;
function DB_PlayAnimationToImage=('_DB_PlayAnimationToImage@24')(int32 iImageIndex, AnimIndex, x, y, x2, y2):boolean; stdcall;
function DB_FreeAnimation=('_DB_FreeAnimation@4')(int32 AnimIndex):boolean; stdcall;
function make_hgeSprite=('_make_hgeSprite@20')(int32 image_id; single texx,texy, w, h):Dword; stdcall;
procedure Screen_Use2DView= ('_Screen_Use2DView@0')(); stdcall;
procedure Screen_Stop2DView=('_Screen_Stop2DView@0')(); stdcall;
procedure hgeSprite_Render=('_hgeSprite_Render@12')(pointer spr; single x, y); stdcall;
procedure defineQueueStarted=('_defineQueueStarted@4')(pointer func); stdcall;
procedure defineQueueEnded=('_defineQueueEnded@4')(pointer func); stdcall;
function CreateCamera=('_CreateCamera@4')(pointer EntityParent):Dword; stdcall;
procedure CameraClsColor=('_CameraClsColor@16')(pointer Camera; single r,g,b ); stdcall;
procedure CameraRange=('_CameraRange@12')(pointer Camera; single neer , far); stdcall;
function LoadMesh=('_LoadMesh@12')(char* file;pointer EntityParent;char* meshName):Dword; stdcall;
procedure PositionEntity=('_PositionEntity@16')(pointer Entity; single x,y,z); stdcall;
function CreateLight=('_CreateLight@4')(int32 lightType):Dword; stdcall;
procedure LightColor=('_LightColor@16')(pointer light; single r,g,b ); stdcall;
}
http://www.freewebs.com/ogremagic/index.htm
Colin
admin
Posts
928
Threads
49
Location
Bulgaria
Post #1312
2012-12-28 22:25:08 UTC
It is now fixed, re-download beta.
Thanks for the bug reports.