xptr variable

If there is something important you think is missing in the current version of ZGameEditor then you can post a feature request here!

Moderator: Moderators

Post Reply
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

xptr variable

Post by Rado1 »

In the current ZGE, it is possible to use xptr type and I'm using it extensively for pointers to C++ structures passed to/returned from external libraries. (Before xptr I was using int type for pointers; which worked for 32bit machines, but not for 64bit.)

Unfortunately, ZGE does not provide full comfort for xptr because it is not possible to declare/use global variable of type xptr. Therefore I request to:

1. Add xptr to the Variable.Type list.

2. If ZLibrary defines a global variable of type xptr, e.g.

Code: Select all

xptr AAA;
, ZExternalLibrary or ZLibrary defines a function returning xptr, e.g.

Code: Select all

xptr foo() {}
, it should be possible to write the following expression

Code: Select all

AAA = foo();
Unfortunately, at the moment, ZGE reports syntax error Invalid conversion: ((float)foo()). An interesting point is that if the xptr variable is defined in expression locally, no syntax error is reported and the code works correctly.
User avatar
VilleK
Site Admin
Posts: 2318
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Post by VilleK »

Hi Rado1,

Yes, I agree. I've now added support for this. Please download beta and try again.

(the problem with sleep on Android that you reported earlier should also be fixed now)

/V
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 »

Ville, checked the latest beta and it works fine; xptr variables and also sleep() on Android. Thanks!
Post Reply