This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Help with SetSurface


Help with SetSurface

Postby webba » Oct 14, 2004 @ 3:46pm

webba
pm Member
 
Posts: 70
Joined: Jul 12, 2004 @ 9:55am


Postby kornalius » Oct 14, 2004 @ 5:57pm

Regards,
Kornalius
President
ArianeSoft Inc.
http://www.arianesoft.ca
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby webba » Oct 15, 2004 @ 9:35am

I applied G_BEGINSCENE() and G_UPDATE() as you suggested but it made no difference. I still get a syntax error from the first SetSurface call.

Could it be the NewSurface call failing and then the handle variable is wrong? What value should the NewSurface call return?
webba
pm Member
 
Posts: 70
Joined: Jul 12, 2004 @ 9:55am


Postby kornalius » Oct 15, 2004 @ 1:28pm

It will return this from PocketFrog:

Frog::Surface* b = m_display->CreateSurface(Width, Height);

It returns a pointer to a new Surface.

I will do a search in the PocketFrog forums.
Regards,
Kornalius
President
ArianeSoft Inc.
http://www.arianesoft.ca
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby kornalius » Oct 15, 2004 @ 6:29pm

Regards,
Kornalius
President
ArianeSoft Inc.
http://www.arianesoft.ca
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby webba » Oct 15, 2004 @ 8:38pm

webba
pm Member
 
Posts: 70
Joined: Jul 12, 2004 @ 9:55am


Postby kornalius » Oct 16, 2004 @ 4:48am

Regards,
Kornalius
President
ArianeSoft Inc.
http://www.arianesoft.ca
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby webba » Oct 19, 2004 @ 1:49pm

webba
pm Member
 
Posts: 70
Joined: Jul 12, 2004 @ 9:55am


Postby kornalius » Oct 19, 2004 @ 1:58pm

Regards,
Kornalius
President
ArianeSoft Inc.
http://www.arianesoft.ca
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby webba » Oct 19, 2004 @ 3:42pm

webba
pm Member
 
Posts: 70
Joined: Jul 12, 2004 @ 9:55am


Postby kornalius » Oct 19, 2004 @ 3:48pm

Regards,
Kornalius
President
ArianeSoft Inc.
http://www.arianesoft.ca
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby webba » Oct 19, 2004 @ 4:32pm

webba
pm Member
 
Posts: 70
Joined: Jul 12, 2004 @ 9:55am


Postby kornalius » Oct 19, 2004 @ 4:50pm

Hi,

I will fix the routine to add this feature.

The new one will look something like this:

DRAWSURFACE (Surface, X, Y, SurfaceX, SurfaceY, Width, Height, Angle, Alpha, Tint, TintLevel, Light, OffsetX, OffsetY)

Edit: Here is the latest from the help file:



Draw surface (surface) at position (SourceX, SourceY) using the current size (DestWidth, DestHeight).

You can rotate the surface with the (angle) parameter and you can also change the blending of the surface by using (alpha).

If you specify a tint other than -1, the surface will be drawn with this color using the Tintlevel for level of tinting.

You can also specify the amount of light the surface should be painted with. Light ranges from 0 to 255, a value of -1 doesn't use light.

You can also only draw a portion of the source surface on the screen using (SourceX, SourceY, SourceWidth, SourceHeight).

OffsetX and OffsetY draw the surface scrolled either horizontally or vertically.

NB: This function should be used inside a DrawProc procedure.

Example:

surface$ = LoadSurface("\\My Documents\\Bitmap.bmp", -1);
DrawSurface(surface$, 10, 10, 30, 30, 0, 0, 0, 0, 0, 50, 0, 0, 0, 0);
Regards,
Kornalius
President
ArianeSoft Inc.
http://www.arianesoft.ca
User avatar
kornalius
pm Member
 
Posts: 1704
Joined: Dec 9, 2003 @ 6:04pm
Location: Montreal, Québec, Canada


Postby webba » Oct 20, 2004 @ 12:52pm

webba
pm Member
 
Posts: 70
Joined: Jul 12, 2004 @ 9:55am


Postby webba » Oct 22, 2004 @ 3:36pm

Kornalius,

My app is coming along nicely but I do have a problem. Every third time I run it (from the PPC editor) it crashes on startup and I have to reset. I've tried compiling to an exe and that runs each time without a problem.

I've put this on my SetSurface thread as I thought it may be related to the way I'm using the GAMEAPI stuff.

I can send you the code if that would help.
webba
pm Member
 
Posts: 70
Joined: Jul 12, 2004 @ 9:55am


Next

Return to Pocket Programming Language (PPL)


Sort


Forum Description

Discuss this new development tool.

Moderator:

kornalius

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum