SDLGameEngine

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

# include/sgecontrol.h

Go to the documentation of this file.

    00001 #ifndef _SGECONTROL_H
    00002 #define _SGECONTROL_H
    00003
    00004 #ifdef __cplusplus
    00005 extern "C" {
    00006 #endif
    00007
    00012 /*
    00013  * Copyright (c) 2007 Heiko Irrgang
    00014  *
    00015  * The license and distribution terms for this file may be
    00016  * found in the file COPYING in this distribution or at
    00017  * http://93-interactive.com/cms/products/software/sdl-game-engine/license/
    00018  */
    00019
    00036 #define SGEREDRAW 0xf00
    00037
    00042 #define SGETIMER SDL_TimerID
    00043
    00048 #define sgeRemoveTimer(timer) SDL_RemoveTimer(timer)
    00049
    00055 #define sgeGameLoop(event,quitvar) while ((SDL_WaitEvent(&event)&&(!quit)))
    00056
    00062 #define sgeStartGame(function, fps) \
    00063         SGETIMER t=sgeStartRedrawTimer(fps);\
    00064         function();\
    00065         sgeStopRedrawTimer(t);
    00066
    00074 SGETIMER sgeAddTimer(int ms, void *function);
    00075
    00081 SGETIMER sgeStartRedrawTimer(int fps);
    00082
    00087 void sgeStopRedrawTimer(SGETIMER sgetimer);
    00088
    00092 Uint32 sgeGetFPS(void);
    00093
    00094 // }@
    00095
    00096 #ifdef __cplusplus
    00097 }
    00098 #endif
    00099
    00100 #endif

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines