Register | Login
Forum Index > Bugs and Fixes > negative float parameter
Author Message
Pages: 1 2 3
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1305] - posted: 2012-12-28 20:13:52
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

Code:
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

Code:
myProc((double)1.5, (double)5.2);


i will see smile

EDIT: actually i'm working on a solution right now, check back in 10-15 mins smile

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1306] - posted: 2012-12-28 21:15:27
OK it is complete, re-download from the beta link

Code:
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 smile

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[1307] - posted: 2012-12-28 21:28:08

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
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1308] - posted: 2012-12-28 22:01:12
DONE smile

check the beta download again.

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[1309] - posted: 2012-12-28 22:09:22

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
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1310] - posted: 2012-12-28 22:13:43
OK check back in 5 mins will check this prob out smile

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?

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[1311] - posted: 2012-12-28 22:20:51
here it is

Code:
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
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1312] - posted: 2012-12-28 22:25:08
It is now fixed, re-download beta.

Thanks for the bug reports.

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Pages: 1 2 3
create new reply


Quick reply:

Message:



Currently Active Users:
There are currently 12 user(s) online. 0 member(s) and 12 guest(s)
Most users ever online was 1046, January 28, 2022, 2:08 pm.


Statistics:
Threads: 225 | Posts: 1848 | Members: 51 | Active Members: 51
Welcome to our newest member, yecate
const Copyright = '2011-2024 © OverHertz Ltd. All rights reserved.';
Web development by OverHertz Ltd