Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

aroe007

I could not complie TurboPixels. Please help me.

This topic is 6591 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.)

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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 ]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!