Ariane Soft PPL2 Pocket Programming DataMite
  #1  
Old 12-19-2006, 06:44 PM
Stargazer Stargazer is offline
Junior Member
 
Join Date: Oct 2006
Posts: 11
Default Sprites over the Surface

Hi , i have a question: i draw a surface with drawsurfaceex and now i want to place some sprites over it. But the sprites behind the surface. i don't now what is to do to put the Sprites over the surface

thanks
Reply With Quote
  #2  
Old 12-19-2006, 06:59 PM
PointOfLight PointOfLight is offline
Senior Member
 
Join Date: Sep 2006
Posts: 1,197
Default

Are you using DrawSprite? If so, are you specifying the desired surface as the second parameter? You must be sure you are drawing the sprite to the destination surface of the DrawSurfaceEX call.
Reply With Quote
  #3  
Old 12-19-2006, 07:29 PM
Stargazer Stargazer is offline
Junior Member
 
Join Date: Oct 2006
Posts: 11
Default

I use the following Syntax:

DrawSurfaceEx(sur$, null, originx, originy ,500, 500, 0, 0, 0, 0, 0, 50, 0, 0, 0, 0, 0, OriginX, OriginY,0,0,0,0);

DRAWSPRITE ( b$, null, 100 , 100,0,0,0);
Reply With Quote
  #4  
Old 12-20-2006, 02:02 AM
kornalius
Guest
 
Posts: n/a
Default

The best thing to do is to NewSprite, then SetSpriteSurface, then you can order your display using SetSpriteOrder to your liking.

s$ = NewSprite;
f$ = LoadSurface(...);
SetSpriteSurface(s$, f$);
SetSpriteOrder(s$, 10);
...

I don't have the exact syntax for each functions but you should get the idea, if you need more info let us know.

What this accomplishes is to create a blank sprite, load an image from disk and then assign the image to the new blank sprite and let the GameAPI engine do the z-ordering for you.
Reply With Quote
  #5  
Old 12-21-2006, 10:49 PM
Stargazer Stargazer is offline
Junior Member
 
Join Date: Oct 2006
Posts: 11
Default

With your help it works. Thanks for this helpfull support. I'm very impressed about your jobs.

Regards
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 10:41 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Copyright (c) ArianeSoft Inc.
Copyright © 2009 www.ppl-lang.com - All rights reserved
Web Design by BR Web Consulting Ltd