sdl3 migrate now compiling, need to go through all the files and clean them up
This commit is contained in:
parent
0dab5f336b
commit
df4390ddba
3 changed files with 11 additions and 7 deletions
|
|
@ -28,13 +28,13 @@ option(ARCHEUS_DEFAULT_CONFIG "Build with default config keys" ON)
|
||||||
option(ARCHEUS_TESTS "Build with tests" OFF)
|
option(ARCHEUS_TESTS "Build with tests" OFF)
|
||||||
|
|
||||||
set(ARCHEUS_WINDOW_BACKEND "NONE" CACHE STRING "Window Backend to build with")
|
set(ARCHEUS_WINDOW_BACKEND "NONE" CACHE STRING "Window Backend to build with")
|
||||||
set_property(CACHE ARCHEUS_WINDOW_BACKEND PROPERTY STRINGS NONE SDL2 GLFW)
|
set_property(CACHE ARCHEUS_WINDOW_BACKEND PROPERTY STRINGS NONE SDL2 SDL3 GLFW)
|
||||||
|
|
||||||
set(ARCHEUS_INPUT_BACKEND "NONE" CACHE STRING "Input Backend to build with, most likely should match Window Backend")
|
set(ARCHEUS_INPUT_BACKEND "NONE" CACHE STRING "Input Backend to build with, most likely should match Window Backend")
|
||||||
set_property(CACHE ARCHEUS_INPUT_BACKEND PROPERTY STRINGS NONE SDL2 GLFW)
|
set_property(CACHE ARCHEUS_INPUT_BACKEND PROPERTY STRINGS NONE SDL2 SDL3 GLFW)
|
||||||
|
|
||||||
set(ARCHEUS_GRAPHICS_BACKEND "NONE" CACHE STRING "Graphics Backend to build with")
|
set(ARCHEUS_GRAPHICS_BACKEND "NONE" CACHE STRING "Graphics Backend to build with")
|
||||||
set_property(CACHE ARCHEUS_GRAPHICS_BACKEND PROPERTY STRINGS NONE SDL2 OPENGL)
|
set_property(CACHE ARCHEUS_GRAPHICS_BACKEND PROPERTY STRINGS NONE SDL2 SDL3 OPENGL)
|
||||||
|
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
set(ARCHEUS_CONSOLE_BACKEND "NONE" CACHE STRING "Console Backend to build with")
|
set(ARCHEUS_CONSOLE_BACKEND "NONE" CACHE STRING "Console Backend to build with")
|
||||||
|
|
@ -99,6 +99,10 @@ none_check_and_init_needed(ARCHEUS_FLAGS ARCHEUS_SOURCES ${ARCHEUS_WINDOW_BACKEN
|
||||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/archeus_sdl2.cmake)
|
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/archeus_sdl2.cmake)
|
||||||
sdl2_check_and_init_needed(ARCHEUS_SOURCES ARCHEUS_INCLUDE_DIRECTORIES ARCHEUS_LINK_LIBRARIES ${ARCHEUS_WINDOW_BACKEND} ${ARCHEUS_INPUT_BACKEND} ${ARCHEUS_GRAPHICS_BACKEND})
|
sdl2_check_and_init_needed(ARCHEUS_SOURCES ARCHEUS_INCLUDE_DIRECTORIES ARCHEUS_LINK_LIBRARIES ${ARCHEUS_WINDOW_BACKEND} ${ARCHEUS_INPUT_BACKEND} ${ARCHEUS_GRAPHICS_BACKEND})
|
||||||
|
|
||||||
|
# ~ SDL3 ~ #
|
||||||
|
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/archeus_sdl3.cmake)
|
||||||
|
sdl3_check_and_init_needed(ARCHEUS_SOURCES ARCHEUS_INCLUDE_DIRECTORIES ARCHEUS_LINK_LIBRARIES ${ARCHEUS_WINDOW_BACKEND} ${ARCHEUS_INPUT_BACKEND} ${ARCHEUS_GRAPHICS_BACKEND})
|
||||||
|
|
||||||
# ~ OPENGL ~ #
|
# ~ OPENGL ~ #
|
||||||
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/archeus_opengl.cmake)
|
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/archeus_opengl.cmake)
|
||||||
opengl_check_and_init_needed(ARCHEUS_FLAGS ARCHEUS_SOURCES ${ARCHEUS_GRAPHICS_BACKEND})
|
opengl_check_and_init_needed(ARCHEUS_FLAGS ARCHEUS_SOURCES ${ARCHEUS_GRAPHICS_BACKEND})
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ void ARC_Spritesheet_Destroy(ARC_Spritesheet *spritesheet);
|
||||||
* @param[in] renderer the renderer to draw to
|
* @param[in] renderer the renderer to draw to
|
||||||
* @param[in] renderBounds the area of the renderer to copy the spritesheet to
|
* @param[in] renderBounds the area of the renderer to copy the spritesheet to
|
||||||
*/
|
*/
|
||||||
void ARC_Spritesheet_Render(ARC_Spritesheet *spritesheet, ARC_Renderer *renderer, ARC_Rect renderBounds);
|
void ARC_Spritesheet_Render(ARC_Spritesheet *spritesheet, ARC_Renderer *renderer, ARC_FRect renderBounds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief renders a section of a spritesheet
|
* @brief renders a section of a spritesheet
|
||||||
|
|
@ -51,7 +51,7 @@ void ARC_Spritesheet_Render(ARC_Spritesheet *spritesheet, ARC_Renderer *renderer
|
||||||
* @param[in] renderer the renderer to draw to
|
* @param[in] renderer the renderer to draw to
|
||||||
* @param[in] renderBounds the area of the renderer to copy the spritesheet area to
|
* @param[in] renderBounds the area of the renderer to copy the spritesheet area to
|
||||||
*/
|
*/
|
||||||
void ARC_Spritesheet_RenderArea(ARC_Spritesheet *spritesheet, ARC_Rect sheetBounds, ARC_Renderer *renderer, ARC_Rect renderBounds);
|
void ARC_Spritesheet_RenderArea(ARC_Spritesheet *spritesheet, ARC_Rect sheetBounds, ARC_Renderer *renderer, ARC_FRect renderBounds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief renders a tile of a spritesheet
|
* @brief renders a tile of a spritesheet
|
||||||
|
|
@ -63,7 +63,7 @@ void ARC_Spritesheet_RenderArea(ARC_Spritesheet *spritesheet, ARC_Rect sheetBoun
|
||||||
* @param[in] renderer the renderer to draw to
|
* @param[in] renderer the renderer to draw to
|
||||||
* @param[in] renderBounds the area of the renderer to copy the tile to
|
* @param[in] renderBounds the area of the renderer to copy the tile to
|
||||||
*/
|
*/
|
||||||
void ARC_Spritesheet_RenderTile(ARC_Spritesheet *spritesheet, ARC_Point tilePosition, ARC_Renderer *renderer, ARC_Rect renderBounds);
|
void ARC_Spritesheet_RenderTile(ARC_Spritesheet *spritesheet, ARC_Point tilePosition, ARC_Renderer *renderer, ARC_FRect renderBounds);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief gets the x and y size of a given spritesheet in pixels
|
* @brief gets the x and y size of a given spritesheet in pixels
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ void ARC_Mouse_CreateWithInput(ARC_Mouse **mouse, ARC_Input *input);
|
||||||
|
|
||||||
void ARC_Mouse_Destroy(ARC_Mouse *mouse);
|
void ARC_Mouse_Destroy(ARC_Mouse *mouse);
|
||||||
void ARC_Mouse_Update(ARC_Mouse *mouse);
|
void ARC_Mouse_Update(ARC_Mouse *mouse);
|
||||||
ARC_Point *ARC_Mouse_GetCoords(ARC_Mouse *mouse);
|
ARC_FPoint *ARC_Mouse_GetCoords(ARC_Mouse *mouse);
|
||||||
ARC_MouseState ARC_Mouse_GetState(ARC_Mouse *mouse, ARC_MouseButton button);
|
ARC_MouseState ARC_Mouse_GetState(ARC_Mouse *mouse, ARC_MouseButton button);
|
||||||
int32_t *ARC_Mouse_GetScrollY(ARC_Mouse *mouse);
|
int32_t *ARC_Mouse_GetScrollY(ARC_Mouse *mouse);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue