Apocalypse, here's how you can get an IDirectDrawSurface7 pointer from a Blitz3D texture handle, including anim textures:
B3D..
tex1=LoadTexture("mytex1.jpg")
SomeFunction(tex1, 0)
C++
Testing incoming pointers for texture or image aint reliable, so you best do texture or image specific code. To use images as the source just adjsut the C++ code like so
Tom
B3D..
tex1=LoadTexture("mytex1.jpg")
SomeFunction(tex1, 0)
C++
BBDECL HRESULT BBCALL SomeFunction(unsigned int buffer, unsigned int srcFrame) { HRESULT hr; if(buffer==0) return 1; buffer = (unsigned int) *((int*)(buffer)); buffer = (unsigned int) *((int*)(buffer+12)); buffer = (unsigned int) *((int*)(buffer+(4 * srcFrame))); IDirectDrawSurface7 *srcSurf = NULL; srcSurf = (IDirectDrawSurface7*) *((int*)(buffer+12)); ...
Testing incoming pointers for texture or image aint reliable, so you best do texture or image specific code. To use images as the source just adjsut the C++ code like so
BBDECL HRESULT BBCALL SomeFunction(unsigned int buffer, unsigned int srcFrame) { HRESULT hr; if(buffer==0) return 1; buffer = (unsigned int) *((int*)(buffer+4)); buffer = (unsigned int) *((int*)(buffer+(4 * srcFrame))); IDirectDrawSurface7 *srcSurf = NULL; srcSurf = (IDirectDrawSurface7*) *((int*)(buffer+12)); ...
Tom