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

User avatar
Rado1
Posts: 770
Joined: Wed May 05, 2010 12:16 pm

xptr variable

Postby Rado1 » Sat Mar 07, 2015 8:38 am

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: 1912
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Postby VilleK » Mon Mar 09, 2015 9:29 am

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: 770
Joined: Wed May 05, 2010 12:16 pm

Postby Rado1 » Mon Mar 09, 2015 10:55 am

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


Return to “Feature requests”

Who is online

Users browsing this forum: No registered users and 1 guest