Page 1 of 1

How do I increase response rate after clicks?

PostPosted: Jul 30, 2002 @ 12:11pm
by joe

PostPosted: Jul 30, 2002 @ 6:03pm
by Johan

RE:

PostPosted: Jul 30, 2002 @ 7:31pm
by joe

PostPosted: Jul 30, 2002 @ 9:43pm
by DillRye

PostPosted: Jul 30, 2002 @ 10:12pm
by joe

PostPosted: Jul 30, 2002 @ 10:17pm
by joe

PostPosted: Jul 31, 2002 @ 12:03am
by Johan
Hi Joe,

I would recommend spending some time browsing through the sample applications before building your own game. I would also recommend reading through the entire documentation on CGapiApplication.

Basically, you should create all surfaces in CGapiApplication::CreateSurfaces. You store the surfaces as member variables (if you are unsure what this is I would recommend reading through some C++ books as well). The contents of a surface is never changed unless you manually change it. This applies to all surfaces, including the backbuffer.

Also. If you want to use the entire surface in a blit operation, you can simply supply NULL as RECT. So.. Your code would look something like:

// Add the following as a member variable
CGapiSurface m_myscene_surface;

CMyApplication::CreateSurfaces(CGapiDisplay& display, HINSTANCE hInstance)
{
m_myscene_surface.CreateSurface(TEXT("Scene.jpg"));
}

CMyApplication::ProcessNextFrame(CGapiSurface& backbuffer, DWORD dwFlags)
{
backbuffer.BltFast(0,0,&m_myscene_surface,NULL,0,NULL);
}

You should always create all your surfaces in CreateSurfaces. The reason for this is that if you rotate the display with SetDisplayMode the surfaces will automatically be recreated to match the new display orientation.

Hope this does the trick.

/Johan