|
Gama C Library
Gama C API Documentation
|
Core header file for the Gama engine. More...
#include "animate.h"#include "body.h"#include "draw.h"#include "gapi.h"#include "key.h"#include "physics.h"#include "sprite.h"#include "system.h"#include "widgets.h"#include <stdio.h>#include <unistd.h>Go to the source code of this file.
Macros | |
| #define | GAMA_VERSION_MAJOR 0 |
| #define | GAMA_VERSION_MINOR 1 |
| #define | GAMA_VERSION_PATCH 0 |
Functions | |
| void | gm_fullscreen (int fullscreen) |
| Puts the window in fullscreen. | |
| void | gm_logo (double x, double y, double s) |
| Draws gama logo. | |
| void | gm_log (const char *txt) |
| void | gm_show_fps (int show) |
| void | _gm_fps () |
| void | gm_sync () |
| Waits for all pending graphics operations to complete. | |
| void | gm_background (gmColor c) |
| Sets the background color of the window. | |
| void | gm_resize (int width, int height) |
| void | gm_init (int width, int height, const char *title) |
| Initializes the Gama engine and opens a window. | |
| void | gm_sleep (int milliseconds) |
| Sleep(wait) for aproximately the specified number of milliseconds. | |
Variables | |
| int | __gm_show_fps = 0 |
Core header file for the Gama engine.
This file includes all the necessary headers and provides the main functions for initializing the engine, managing the game loop, and handling basic window operations.
| #define GAMA_VERSION_MAJOR 0 |
| #define GAMA_VERSION_MINOR 1 |
| #define GAMA_VERSION_PATCH 0 |
| void _gm_fps | ( | ) |
| void gm_background | ( | gmColor | c | ) |
Sets the background color of the window.
| c | The color to set as the background. |
| void gm_fullscreen | ( | int | fullscreen | ) |
Puts the window in fullscreen.
| fullscreen | Enable or disable fullscreen. |
| void gm_init | ( | int | width, |
| int | height, | ||
| const char * | title ) |
Initializes the Gama engine and opens a window.
This must be the first Gama function called. It sets up the graphics context and creates a window with the specified dimensions and title.
| width | The width of the window in pixels. |
| height | The height of the window in pixels. |
| title | The title of the window. |
| void gm_log | ( | const char * | txt | ) |
| void gm_logo | ( | double | x, |
| double | y, | ||
| double | s ) |
Draws gama logo.
| x | The x position to draw the logo. |
| y | The y position to draw the logo. |
| s | The logo size. |
| void gm_resize | ( | int | width, |
| int | height ) |
| void gm_show_fps | ( | int | show | ) |
| void gm_sleep | ( | int | milliseconds | ) |
Sleep(wait) for aproximately the specified number of milliseconds.
| miliseconds | the number of milliseconds to sleep |
| void gm_sync | ( | ) |
Waits for all pending graphics operations to complete.
This can be used for synchronization purposes, but it is rarely needed as gm_yield() handles buffer swapping automatically.
| int __gm_show_fps = 0 |