/* * Voxel-a-tord * display.h: * Copyright (c) 2021-2022 986-Studio. All rights reserved. * * Created by Manoƫl Trapier on 01/03/2021. */ #ifndef THREEDENGINE_SOURCE_INCLUDE_DISPLAY_H #define THREEDENGINE_SOURCE_INCLUDE_DISPLAY_H #include #include #include /*********************************************************************************************************************** * Data types **********************************************************************************************************************/ typedef struct window_t { int32_t height, width; } window_t; /*********************************************************************************************************************** * Constants **********************************************************************************************************************/ #define FPS (60) #define FRAME_TARGET_TIME (1000 / FPS) /*********************************************************************************************************************** * Prototypes **********************************************************************************************************************/ /* --- Window functions --- */ bool initialiseWindow(int32_t screenWidth, int32_t screenHeight, bool fullScreen); void destroyWindow(); void renderFrameBuffer(); void getWindowSize(int32_t *width, int32_t *height); void displayWindowClear(); void displayWindowRender(); /* --- Drawing functions --- */ void clearFrameBuffer(colour_t colour); void drawPixel(int32_t x, int32_t y, colour_t colour); void drawGrid(int spacing, colour_t colour); void drawRectangle(int32_t x, int32_t y, int32_t w, int32_t h, colour_t colour); void drawVLine(int32_t x, int32_t y0, int32_t y1, colour_t colour); void drawHLine(int32_t x0, int32_t y, int32_t x1, colour_t colour); void drawLine(int32_t x0, int32_t y0, int32_t x1, int32_t y1, colour_t colour); void drawText(int32_t x, int32_t y, colour_t colour, const char *format, ...); #endif /* THREEDENGINE_SOURCE_INCLUDE_DISPLAY_H */