PureBasic Bindings for GameVision SDK 2
PureBasic Bindings for GameVision SDK 2
Hello,
We made PB bindings for the GameVision SDK 2, a 2D rendering API for PC's running Microsoft Windows. This release is aimed specifically at Direct3D with 3D hardware. The GameVision SDK is feature complete and can easily create any type of 2D game with D3D for rendering. GameVision 1.x powered our game FreeStrike 1.x. GV was designed to be easy to use, robust and feature rich and should be easy to use in your projects.
You can download the beta PB bindings here: http://www.bigdaddygames.com/temp/gvsdk2_pb.zip (752KB) [PB 3.9x]
We hope to have official PB bindings plus examples in the next GVSDK2 update.
Visit the Big Daddy Games web site for more information about GVSDK2.
Best Regards,
Jarrod Davis
CEO/Lead Developer
Big Daddy Games, Inc.
support@bigdaddygames.com
www.bigdaddygames.com
We made PB bindings for the GameVision SDK 2, a 2D rendering API for PC's running Microsoft Windows. This release is aimed specifically at Direct3D with 3D hardware. The GameVision SDK is feature complete and can easily create any type of 2D game with D3D for rendering. GameVision 1.x powered our game FreeStrike 1.x. GV was designed to be easy to use, robust and feature rich and should be easy to use in your projects.
You can download the beta PB bindings here: http://www.bigdaddygames.com/temp/gvsdk2_pb.zip (752KB) [PB 3.9x]
We hope to have official PB bindings plus examples in the next GVSDK2 update.
Visit the Big Daddy Games web site for more information about GVSDK2.
Best Regards,
Jarrod Davis
CEO/Lead Developer
Big Daddy Games, Inc.
support@bigdaddygames.com
www.bigdaddygames.com
How can I represent this type of structure in PB?
Thanks.
Jarrod
Code: Select all
/* GV_Vector - C/C++*/
typedef struct GV_Vector {
union {
struct { int iX, iY, iZ; };
struct { unsigned int cX, cY, cZ; };
struct { float sX, sY, sZ; };
struct { double dX, dY, dZ; };
};
} GV_Vector, *GV_pVector;
Jarrod
I don't know how C++ structures work.
However if you want all four included structures to share the same space (offset zero for each) then:
If not (they are to be contiguous, which I assume) then
Above assumes int is long (4 bytes) and float is single precision (4 bytes). If double is an eight byte float then there is a problem as PB limits itself to 4 byte floats. I don't know of a way to get an unsigned long integer in PB. To get an unsigned word (2 byte) access using
var =GV_Vector\SB\cX & $FFFF
Finally, if I am off track or talking cr@p, someone smarter than I will come along and correct the above.
PS: I typed that in directly, it is not cut and paste so may have typos or other errors.
However if you want all four included structures to share the same space (offset zero for each) then:
Code: Select all
Structure one
iX.l
iY.l
iZ.l
Endstructure
Structure two
cX.l
cY.l
cZ.l
Endstructure
Structure three
sX.f
sY.f
sZ.f
Endstructure
Structure four
dX.f
dY.f
dZ.f
Endstructure
; GV_Vector - C/C++
Structure GV_Vector
StructureUnion {
sA.one
sB.two
sC.three
sD.four
EndStructureUnion
EndStructure
If not (they are to be contiguous, which I assume) then
Code: Select all
; GV_Vector - C/C++
Structure GV_Vector
sA.one
sB.two
sC.three
sD.four
EndStructure
var =GV_Vector\SB\cX & $FFFF
Finally, if I am off track or talking cr@p, someone smarter than I will come along and correct the above.

PS: I typed that in directly, it is not cut and paste so may have typos or other errors.
@}--`--,-- A rose by any other name ..
Hi,
In GVSDK2, all exported routines use the STDCALL calling convention including all callback types. For example, I am currently working on making PB bindings for our ScriptVision SDK 2 (complete scripting using a modified version of lua wrapped in an easy to use API) and it defines a few callbacks that are needed for the advanced features such as debugging and error handling.
Can PB call a callback routine that uses the STDCALL calling convention?
Thanks
Jarrod
In GVSDK2, all exported routines use the STDCALL calling convention including all callback types. For example, I am currently working on making PB bindings for our ScriptVision SDK 2 (complete scripting using a modified version of lua wrapped in an easy to use API) and it defines a few callbacks that are needed for the advanced features such as debugging and error handling.
Can PB call a callback routine that uses the STDCALL calling convention?
Thanks
Jarrod
Try CallFunction(). If it doesn't work try CallCFunction()BigDaddy wrote: Can PB call a callback routine that uses the STDCALL calling convention?
MFG
WolfgangS
WolfgangS' projects http://www.schliess.net
Quotation of the month:
<p3hicy>oder ich hol mir so eine geile aus asien
<p3hicy>die ständig poppen will
<p3hicy>'n brötchen pro tag reicht doch
<p3hicy>die essen eh' nich so viel
Quotation of the month:
<p3hicy>oder ich hol mir so eine geile aus asien
<p3hicy>die ständig poppen will
<p3hicy>'n brötchen pro tag reicht doch
<p3hicy>die essen eh' nich so viel
Hi,
Yes I understand, but what I am wondering however is that when I define a function in PB does it use STDCALL by default? Once I set the callback, the dll itself will call the routine automatically, which will expect it to be in STDCALL form.
In C/C++ or Delph I can do this:
// c/c++
void __stdcall MyErrorProc(void); // will use stdcall
// delphi
procedure MyErrorProc; stdcall; // will use stdcall
Then when I call SV_SetErrorProc(MyErrorProc) this will define a error callback that the dll will call automatically when it encounters an error. So, I guess what I am asking then is how do I declare a routine to use a specific calling convention in PB?
Yes I understand, but what I am wondering however is that when I define a function in PB does it use STDCALL by default? Once I set the callback, the dll itself will call the routine automatically, which will expect it to be in STDCALL form.
In C/C++ or Delph I can do this:
// c/c++
void __stdcall MyErrorProc(void); // will use stdcall
// delphi
procedure MyErrorProc; stdcall; // will use stdcall
Then when I call SV_SetErrorProc(MyErrorProc) this will define a error callback that the dll will call automatically when it encounters an error. So, I guess what I am asking then is how do I declare a routine to use a specific calling convention in PB?
-
- User
- Posts: 35
- Joined: Sat Aug 16, 2003 4:52 pm
- Location: Germany
-
- User
- Posts: 19
- Joined: Mon Oct 03, 2005 10:00 am
-
- Enthusiast
- Posts: 215
- Joined: Sun Jan 04, 2004 3:38 am
- Location: Maryland