-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
89 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
add_library(antara_sdl STATIC) | ||
target_sources(antara_sdl PRIVATE antara/gaming/sdl/graphic.system.cpp) | ||
target_include_directories(antara_sdl PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) | ||
target_link_libraries(antara_sdl PUBLIC antara::sdl_import antara::ecs antara::event) | ||
add_library(antara::sdl ALIAS antara_sdl) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/****************************************************************************** | ||
* Copyright © 2013-2019 The Komodo Platform Developers. * | ||
* * | ||
* See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * | ||
* the top-level directory of this distribution for the individual copyright * | ||
* holder information and the developer policies on copyright and licensing. * | ||
* * | ||
* Unless otherwise agreed in a custom licensing agreement, no part of the * | ||
* Komodo Platform software, including this file may be copied, modified, * | ||
* propagated or distributed except according to the terms contained in the * | ||
* LICENSE file * | ||
* * | ||
* Removal or modification of this copyright notice is prohibited. * | ||
* * | ||
******************************************************************************/ | ||
|
||
#include <SDL2/SDL.h> | ||
#include "antara/gaming/event/fatal.error.hpp" | ||
#include "antara/gaming/sdl/graphic.system.hpp" | ||
|
||
namespace antara::gaming::sdl | ||
{ | ||
void graphic_system::update() noexcept | ||
{ | ||
} | ||
|
||
graphic_system::graphic_system(entt::registry ®istry) noexcept : system(registry) | ||
{ | ||
if (auto res = SDL_Init(SDL_INIT_VIDEO); res < 0) { | ||
this->dispatcher_.trigger<event::fatal_error>(std::error_code(res, std::generic_category())); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/****************************************************************************** | ||
* Copyright © 2013-2019 The Komodo Platform Developers. * | ||
* * | ||
* See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * | ||
* the top-level directory of this distribution for the individual copyright * | ||
* holder information and the developer policies on copyright and licensing. * | ||
* * | ||
* Unless otherwise agreed in a custom licensing agreement, no part of the * | ||
* Komodo Platform software, including this file may be copied, modified, * | ||
* propagated or distributed except according to the terms contained in the * | ||
* LICENSE file * | ||
* * | ||
* Removal or modification of this copyright notice is prohibited. * | ||
* * | ||
******************************************************************************/ | ||
|
||
#pragma once | ||
|
||
#include <entt/entity/registry.hpp> | ||
#include "antara/gaming/ecs/system.hpp" | ||
|
||
namespace antara::gaming::sdl | ||
{ | ||
class graphic_system final : public ecs::post_update_system<graphic_system> | ||
{ | ||
public: | ||
graphic_system(entt::registry& registry) noexcept; | ||
void update() noexcept final; | ||
}; | ||
} | ||
|
||
REFL_AUTO(type(antara::gaming::sdl::graphic_system)); |