| Home
| Previous
| Next
| Up

GM_setGameLogicFunc

Sets the game logic callback function

Declaration

void MGLAPI GM_setGameLogicFunc(
GM_gameFunc func)
typedef void (*GM_gameFunc)(void)

Prototype In

gm/gm.h

Parameters

func | Game logic callback function to register

Description

This function sets the game logic callback function for your Game Framework game and is called by the Game Framework main loop (GM_mainLoop) once per frame to update the game logic for the next frame after drawing the current frame.

Note: In order to be able to continue running your games main logic loops while the user has switch away (ie: Alt-Tab) from your game in Windows, while the application is minimised we continue to process messages and call the registered game logic callback, however the draw callback will not be called until the application is restored to fullscreen mode. Hence your game logic callback should not contain any code that performs drawing to the screen, as all that code should be located in your draw callback function.

See Also

GM_init, GM_setDrawFunc

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com