-
Notifications
You must be signed in to change notification settings - Fork 0
/
methods.h
28 lines (24 loc) · 944 Bytes
/
methods.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#ifndef SDL_METHODS_H_INCLUDED
#define SDL_METHODS_H_INCLUDED
#include "../../libs/main.h"
/**
* @brief Gets the current screen resolution.
*
* @param width Pointer to store the screen width.
* @param height Pointer to store the screen height.
*
* @return Returns `1` if the screen resolution was successfully obtained, or `0` if it was not.
*/
int getScreenResolution(int* width, int* height);
/**
* @brief Starts a Conway's Game of Life game using the SDL library for display.
*
* @param pGame Pointer to a Conway's Game of Life structure.
* @param maxGeneration Maximum number of generations.
* @param delayBetweenGenerations Delay in milliseconds between each generation.
*
* @warning This function assumes that `pGame` has been properly initialized.
*/
unsigned char startGameBySDL(TGame* pGame, const int maxGeneration,
const int delayBetweenGenerations);
#endif // SDL_METHODS_H_INCLUDED