1
0
Fork 0
mirror of https://github.com/k4zmu2a/SpaceCadetPinball.git synced 2024-06-17 20:33:19 +02:00
SpaceCadetPinball/SpaceCadetPinball/fullscrn.h
Alexis Murzeau 66a868083a
Add translations (#153)
* Add translations from v1

* Add font configuration (to be able to use non-latin languages)

* translations: remove includes that are already in pch.h

* translations: rename enums and avoid macros

* Fix crash when the font file doesn't exist

* translations: avoid u8 to avoid reencoding by MSVC

MSVC will read the file as ASCII and reconvert characters as UTF-8, this will corrupt characters as the file is in fact already in UTF-8.

* translations: remove NUMBER in enums

* translations: handle non existing translations gracefuly (don't crash)

Fallback to english if available, else return empty string

* Testing pull collaboration.

* Rollback: remove NUMBER in enums.

* Get rid of namespace, use header instead.

* Collapsed translated text struct and array.

* Fixed build errors and warnings.

* Simplified language list.

* All new types, locals and globals should use CamelCase.

* Removed unnecessary ImGui patch.

* Rearranged TTextBox immediate mode draw.

* Final touches: removed unused declaration in gdrv.
Removed unused Msg entries and added new check.

* Remove placeholder english texts from missing translations

Co-authored-by: Muzychenko Andrey <33288308+k4zmu2a@users.noreply.github.com>
2022-08-31 07:58:03 +03:00

39 lines
843 B
C++

#pragma once
struct resolution_info
{
int16_t ScreenWidth;
int16_t ScreenHeight;
int16_t TableWidth;
int16_t TableHeight;
int16_t ResolutionMenuId;
};
class fullscrn
{
public:
static int screen_mode;
static int display_changed;
static const resolution_info resolution_array[3];
static float ScaleX;
static float ScaleY;
static int OffsetX;
static int OffsetY;
static void init();
static void shutdown();
static int set_screen_mode(int isFullscreen);
static void activate(int flag);
static int GetResolution();
static void SetResolution(int value);
static int GetMaxResolution();
static void window_size_changed();
static SDL_Rect GetScreenRectFromPinballRect(SDL_Rect rect);
static float GetScreenToPinballRatio();
private :
static int resolution;
static int enableFullscreen();
static int disableFullscreen();
};