Claude Chappe' Curse - A C Game
Logo Institut d'Informatique Claude Chappe Logo Université de Le Mans Logo Raeptor Production
 
Loading...
Searching...
No Matches
settings.h File Reference

Defines the available screen resolutions for the application. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Keybinds
 A structure to hold key bindings for various actions in the game. More...
 
struct  Settings
 A structure to hold various settings for the application. More...
 

Enumerations

enum  Resolutions {
  RES_RESPONSIVE , RES_NATIVE , RES_640x480 , RES_800x600 ,
  RES_1024x768 , RES_1280x720 , RES_1280x800 , RES_1280x1024 ,
  RES_1366x768 , RES_1440x900 , RES_1600x900 , RES_1680x1050 ,
  RES_1920x1080 , RES_1920x1200 , RES_2560x1440 , RES_COUNT
}
 Enumeration of possible screen resolutions. More...
 

Functions

void get_resolution (int *width, int *height)
 Retrieves the current screen resolution.
 
void save_settings ()
 Saves the application settings to a configuration file.
 
void load_settings ()
 Loads the application settings from a configuration file.
 

Variables

const char resolutionsText [RES_COUNT][256]
 Array of resolution text strings.
 

Detailed Description

Defines the available screen resolutions for the application.

Enumeration Type Documentation

◆ Resolutions

Enumeration of possible screen resolutions.

This enumeration defines various screen resolutions that the application can support. It includes both standard resolutions and a responsive option.

Enumerator
RES_RESPONSIVE 

The application will adjust to the screen size dynamically.

RES_NATIVE 

The application will use the native resolution of the display.

RES_640x480 

640x480 resolution.

RES_800x600 

800x600 resolution.

RES_1024x768 

1024x768 resolution.

RES_1280x720 

1280x720 resolution (HD).

RES_1280x800 

1280x800 resolution.

RES_1280x1024 

1280x1024 resolution.

RES_1366x768 

1366x768 resolution.

RES_1440x900 

1440x900 resolution.

RES_1600x900 

1600x900 resolution.

RES_1680x1050 

1680x1050 resolution.

RES_1920x1080 

1920x1080 resolution (Full HD).

RES_1920x1200 

1920x1200 resolution.

RES_2560x1440 

2560x1440 resolution (Quad HD).

RES_COUNT 

The total number of resolutions defined in this enumeration.

Function Documentation

◆ get_resolution()

void get_resolution ( int *  width,
int *  height 
)

Retrieves the current screen resolution.

This function populates the provided width and height pointers with the current screen resolution values.

Parameters
[out]widthPointer to an integer where the screen width will be stored.
[out]heightPointer to an integer where the screen height will be stored.

◆ save_settings()

void save_settings ( )

Saves the application settings to a configuration file.

◆ load_settings()

void load_settings ( )

Loads the application settings from a configuration file.

Variable Documentation

◆ resolutionsText

const char resolutionsText[RES_COUNT][256]
extern

Array of resolution text strings.

This external variable holds an array of resolution text strings, where each string represents a different resolution option available in the application.

Note
The size of each string is limited to 256 characters.
Warning
Ensure that RES_COUNT is defined and corresponds to the number of resolution options available.