|
Gama C Library
Gama C API Documentation
|
Core header file for the Gama engine. More...
#include "draw.h"#include "gapi.h"#include "stdio.h"#include "widgets/frame.h"#include <unistd.h>Go to the source code of this file.
Functions | |
| int | main () |
| int32_t | gama_run () |
| void | gm_fullscreen (int fullscreen) |
| Puts the window in fullscreen. | |
| void | gm_logo (double x, double y, double s) |
| Draws the Gama logo. | |
| void | gm_log (const char *txt) |
| Logs a message to the platform's console. | |
| void | gm_show_fps (int show) |
| void | gm_background (gmColor c) |
| Sets the background color of the window. | |
| void | gm_resize (int width, int height) |
| Resizes the application window. | |
| void | gm_init (int width, int height, const char *title) |
| Initializes the Gama engine and opens a window. | |
| void | gm_sleep (int milliseconds) |
| Pauses execution for a specified duration. | |
Variables | |
| int | __gm_show_fps = 0 |
| Enables or disables the built-in FPS counter display. | |
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.
| int32_t gama_run | ( | ) |
| 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 | Boolean flag to enable (1) or disable (0) 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. Use 0 for automatic sizing. |
| height | The height of the window in pixels. Use 0 for automatic sizing. |
| title | The title of the window. |
| void gm_log | ( | const char * | txt | ) |
Logs a message to the platform's console.
| txt | The text message to log. |
| void gm_logo | ( | double | x, |
| double | y, | ||
| double | s ) |
Draws the Gama logo.
| x | The center x position to draw the logo. |
| y | The center y position to draw the logo. |
| s | The size (side length) of the logo. |
| void gm_resize | ( | int | width, |
| int | height ) |
Resizes the application window.
| width | The new width of the window in pixels. |
| height | The new height of the window in pixels. |
| void gm_show_fps | ( | int | show | ) |
| void gm_sleep | ( | int | milliseconds | ) |
Pauses execution for a specified duration.
This function blocks the calling thread for approximately the given number of milliseconds.
| milliseconds | The number of milliseconds to sleep. |
| int main | ( | ) |
| int __gm_show_fps = 0 |
Enables or disables the built-in FPS counter display.
| show | Boolean flag to show (1) or hide (0) the FPS counter. |