prog
This commit is contained in:
63
src/display/screen.h
Normal file
63
src/display/screen.h
Normal file
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* Copyright (c) 2025 Dominic Masters
|
||||
*
|
||||
* This software is released under the MIT License.
|
||||
* https://opensource.org/licenses/MIT
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "dusk.h"
|
||||
|
||||
typedef enum {
|
||||
SCREEN_MODE_BACKBUFFER,
|
||||
|
||||
#if DISPLAY_SIZE_DYNAMIC == 1
|
||||
#endif
|
||||
// SCREEN_MODE_FIXED_ASPECT,
|
||||
// SCREEN_MODE_FIXED_ASPECT_INTEGER,
|
||||
// SCREEN_MODE_FIXED_HEIGHT,
|
||||
// SCREEN_MODE_FIXED_HEIGHT_INTEGER,
|
||||
// SCREEN_MODE_FIXED_WIDTH,
|
||||
// SCREEN_MODE_FIXED_WIDTH_INTEGER,
|
||||
// SCREEN_MODE_SUPER_RESOLUTION_HEIGHT,
|
||||
// SCREEN_MODE_SUPER_RESOLUTION_WIDTH
|
||||
} screenmode_t;
|
||||
|
||||
typedef struct {
|
||||
screenmode_t mode;
|
||||
|
||||
// Calculated dimensions of the viewport, to be used by the camera
|
||||
int32_t width;
|
||||
int32_t height;
|
||||
|
||||
union {
|
||||
|
||||
};
|
||||
} screen_t;
|
||||
|
||||
extern screen_t SCREEN;
|
||||
|
||||
/**
|
||||
* Initializes the screen system.
|
||||
*/
|
||||
void screenInit();
|
||||
|
||||
/**
|
||||
* Binds the screen, this is done before rendering game content.
|
||||
*/
|
||||
void screenBind();
|
||||
|
||||
/**
|
||||
* Unbinds the screen, does nothing for now.
|
||||
*/
|
||||
void screenUnbind();
|
||||
|
||||
/**
|
||||
* Renders the screen to the current framebuffer.
|
||||
*/
|
||||
void screenRender();
|
||||
|
||||
/**
|
||||
* Disposes the screen system.
|
||||
*/
|
||||
void screenDispose();
|
Reference in New Issue
Block a user