
Posted:
Oct 15, 2004 @ 9:35am
by webba
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?

Posted:
Oct 15, 2004 @ 1:28pm
by kornalius
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.

Posted:
Oct 19, 2004 @ 4:50pm
by kornalius
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);

Posted:
Oct 22, 2004 @ 3:36pm
by webba
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.