I could not complie TurboPixels. Please help me.

Started by
3 comments, last by aroe007 23 years, 4 months ago
I have just downloaded TurboPixels 1.1 from http://turbo.gamedev.net/turbopixels.zip When I try to compile it seems to have a problem at the line 99 --> if LockedSurface.Lock(@LockedRect, // do the lock LockedSurfaceDesc, DDLOCK_SURFACEMEMORYPTR + DDLOCK_WAIT, 0) <> DD_OK then Result := False else Result := True; This is what Delphi said --> [Error] turbopixels.pas(99): Incompatible types: ''TDDSurfaceDesc2'' and ''TDDSurfaceDesc'' I really have no idea because I''m a beginner. Is this because TurboPixels 1.1 is compatible to only some particular DelphiX version? Anybody know how I should modify the code? (I''m using Delphi5 + DirectX7.0a + DelphiX v2000.07.17a.)
Advertisement
Hey aroe

...I don''t quite recall the procedure... - but the "LockedSurfaceDesc" that is a parameter to the Lock function is of an invalid type (I believe DelphiX has changed its Surface type from an earlier type).

I think you should try to alter the turbopixel code. Change the Lock and Unlock procedures function call to accept TDDSurfaceDesc2 (or whichever the >other< type is).

Alternatively, try the PixelCore routines, one of the two should work. (/me *mumbles* prayer)

g''luck
A-Lore
Hi!

Hori did change the call to DirectX in his new version, therefor turbopixel isn''t working. It''s simple to change thu, you have to check that the calling part is TDDSurfaceDesc2 on both sides, follow me?

And if I don''t remember wrong, turbo has put an fix on his website?

Well, if you can''t find the fix and you don''t fix it, send me an mail and I''ll send you a working copy.

Good luck!
/Marco.
ME
Here''s the fix I posted...

quote:
Some people have noticed that turboPixels (and the other direct access pixel libs) won''t compile do to the incompatible types of TDDSurfaceDesc and TDDSurfaceDesc2 in the latest version of DelphiX. This is a minor change introduced in DelphiX for DirectX7. The fix is easy. Look for this code snipit near line 90 in turboPixels....


var
LockedSurface: IDirectDrawSurface4;
LockedSurfaceDesc: TDDSurfaceDesc; // <--problem
LockedRect: TRect;
bitfix: cardinal; // for 555 or 565


... then change TDDSurfaceDesc to TDDSurfaceDesc2 like so....


var
LockedSurface: IDirectDrawSurface4;
LockedSurfaceDesc: TDDSurfaceDesc2; // <-- solution
LockedRect: TRect;
bitfix: cardinal; // for 555 or 565


That should work for turboPixels, and a simmilar change should work for most other libs too. I''ll be posting an updated turboPixels 1.2 soon with this and other fixes should you be inclined to waiting


[ turbo | turbo.gamedev.net ]
[ Michael Wilson | turbo sys-op | turbo.gamedev.net ]
Oh yehhh... I works. Thank you everybody ))

This topic is closed to new replies.

Advertisement