-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add renderer sfml - prework * add renderer sfml - prework 2 * add renderer sfml - prework 3 * rework sfml renderer and add gmock * something is wrong... * something is wrong... v2 * save it * it works...partially * add examples * try fix window compilation * add sfml lib dir for appveyor * try fix linux compilation * try fix linux compilation - add this * add factory * reorganize files * Reorganize directories and replace math structures by own * Reorganize directories part two * cmake make global standard requirements * fix std14 standard for linux * ut * update glm from 0.9.5.3 to 0.9.9-a1 * update GSL to master * update range-v3 from 0.2.1 to 0.3.0 * update docs * ut * fix dependency * fix dependency * external up * refactoring example * refactoring * fix warnings * merge master fix * not working yet, but commit need to be done * still in progress * add Window to graphics * remove disabling warning * update imgs * fix sfml enum in test * add boost operator * update docs * update ClassDiagram md * appveyor show lib lis * review fix * fix appveyor * merge with master part two * fix window crash * fix warnings * fix test coverage linker * make coverage global * delete src directory and update docs * add window test suites * sneaking around * sneaking around * sneaking around * sneaking around * sneaking around * sneaking around * sneaking around * sneaking around * fix not overriden virtual function * boost boost * fix unused-template * fix game ut compilation * fix and restore game ut * introduce math lib to physics interface * fix physics cmake * try to disable coverage for facade function * try to disable coverage for facade function * change SfmlRenderTarget to template class and create stub for testing purpose
- Loading branch information
Showing
89 changed files
with
1,653 additions
and
291 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
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 |
---|---|---|
@@ -1,44 +1,40 @@ | ||
cmake_minimum_required (VERSION 2.8.11) | ||
project("bomberman") | ||
cmake_minimum_required (VERSION 3.2.2) | ||
project("bomberman" CXX) | ||
|
||
set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
||
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) | ||
set(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) | ||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules" ${CMAKE_MODULE_PATH}) | ||
set(EXTERNAL_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/external") | ||
set(GLM_INCLUDE_DIR "${EXTERNAL_INCLUDE_DIR}/glm/") | ||
set(RANGEV3_INCLUDE_DIR "${EXTERNAL_INCLUDE_DIR}/range-v3/include/") | ||
set(FAKEIT_INCLUDE_DIR "${EXTERNAL_INCLUDE_DIR}/fakeit/single_header/gtest/") | ||
set(GSL_INCLUDE_DIR "${EXTERNAL_INCLUDE_DIR}/GSL/include") | ||
set(GMOCK_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/external/googletest/googlemock/include") | ||
set(GTEST_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/external/googletest/googletest/include") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGSL_THROW_ON_CONTRACT_VIOLATION") | ||
|
||
enable_testing() | ||
|
||
add_subdirectory(external/googletest/) | ||
|
||
if(${WIN32}) | ||
include(${CMAKE_SOURCE_DIR}/cmake/platforms/Windows.cmake) | ||
else() | ||
include(${CMAKE_SOURCE_DIR}/cmake/platforms/Linux.cmake) | ||
endif() | ||
|
||
find_package(SFML 2 COMPONENTS system window graphics network audio) | ||
|
||
if(SFML_FOUND) | ||
enable_testing() | ||
|
||
set(GLM_INCLUDE_DIR "${EXTERNAL_INCLUDE_DIR}/glm/") | ||
set(RANGEV3_INCLUDE_DIR "${EXTERNAL_INCLUDE_DIR}/range-v3/include/") | ||
set(FAKEIT_INCLUDE_DIR "${EXTERNAL_INCLUDE_DIR}/fakeit/single_header/gtest/") | ||
set(GSL_INCLUDE_DIR "${EXTERNAL_INCLUDE_DIR}/GSL/include") | ||
set(GMOCK_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/external/googletest/googlemock/include") | ||
set(GTEST_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/external/googletest/googletest/include") | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DGSL_THROW_ON_CONTRACT_VIOLATION") | ||
|
||
add_subdirectory(external/googletest) | ||
|
||
if(${WIN32}) | ||
include(${CMAKE_SOURCE_DIR}/cmake/platforms/Windows.cmake) | ||
else() | ||
include(${CMAKE_SOURCE_DIR}/cmake/platforms/Linux.cmake) | ||
endif() | ||
|
||
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") | ||
include(${CMAKE_SOURCE_DIR}/cmake/compilators/Clang.cmake) | ||
elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC") | ||
include(${CMAKE_SOURCE_DIR}/cmake/compilators/Msvc.cmake) | ||
else() | ||
include(${CMAKE_SOURCE_DIR}/cmake/compilators/Gcc.cmake) | ||
endif() | ||
|
||
include_directories(SYSTEM ${RANGEV3_INCLUDE_DIR}) | ||
include_directories(SYSTEM ${SFML_INCLUDE_DIR}) | ||
include_directories(SYSTEM ${GSL_INCLUDE_DIR}) | ||
include_directories(SYSTEM ${GLM_INCLUDE_DIR}) | ||
|
||
add_subdirectory(src) | ||
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") | ||
include(${CMAKE_SOURCE_DIR}/cmake/compilators/Clang.cmake) | ||
elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "MSVC") | ||
include(${CMAKE_SOURCE_DIR}/cmake/compilators/Msvc.cmake) | ||
else() | ||
include(${CMAKE_SOURCE_DIR}/cmake/compilators/Gcc.cmake) | ||
endif() | ||
|
||
include_directories(SYSTEM ${RANGEV3_INCLUDE_DIR}) | ||
include_directories(SYSTEM ${GSL_INCLUDE_DIR}) | ||
include_directories(SYSTEM ${GLM_INCLUDE_DIR}) | ||
|
||
add_subdirectory(src) |
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 |
---|---|---|
@@ -1,4 +1,2 @@ | ||
# bomberman | ||
Repo for bomberman | ||
|
||
[![Build Status](https://travis-ci.org/NadzwyczajnaGrupaRobocza/bomberman.svg?branch=master)](https://travis-ci.org/NadzwyczajnaGrupaRobocza/bomberman)[![Build status](https://ci.appveyor.com/api/projects/status/60vqqan3qtj4eu35/branch/master?svg=true)](https://ci.appveyor.com/project/Abergard/bomberman/branch/master)[![codecov](https://codecov.io/gh/NadzwyczajnaGrupaRobocza/bomberman/branch/master/graph/badge.svg)](https://codecov.io/gh/NadzwyczajnaGrupaRobocza/bomberman) |
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 |
---|---|---|
@@ -1,9 +1,10 @@ | ||
message(STATUS "Detected GNU CXX compiler.") | ||
message(STATUS "Detected Linux kind system.") | ||
|
||
option(ENABLE_COVERAGE "Enable coverage reporting for gcc/clang" FALSE) | ||
|
||
if(${ENABLE_COVERAGE}) | ||
add_compile_options(--coverage -O0) | ||
link_libraries(--coverage) | ||
endif() | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") |
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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
# Class diagram | ||
|
||
## All | ||
![ClassDiagramImage](./img/class_diagram.png) | ||
|
||
## Graphics | ||
![GraphicsClassDiagramImage](./img/class_diagram_graphics.png) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,86 @@ | ||
@startuml | ||
|
||
namespace sf{ | ||
class RectangleShape | ||
class Window | ||
abstract class RenderTarget | ||
} | ||
|
||
namespace graphics { | ||
package public <<Rectangle>> { | ||
|
||
interface RendererPool{ | ||
+ RendererId acquire(const math::Size2f&, const math::Position2f&) | ||
+ void release(const RendererId&) | ||
+ void render_all() | ||
+ void set_position(const RendererId&, const math::Position2f&) | ||
+ Position get_position(const RendererId&) | ||
} | ||
interface Window{ | ||
+ bool is_open() | ||
+ void display() | ||
+ void update() | ||
} | ||
class RendererId | ||
} | ||
package private <<Rectangle>> { | ||
|
||
package types{ | ||
math.Position2f <|-- Position2f | ||
math.Size2f <|-- Size2f | ||
math.Size2u <|-- WindowSize | ||
} | ||
|
||
package sfml_adaptors <<Rectangle>> { | ||
|
||
interface SfmlWindow{ | ||
+ bool is_open() | ||
+ void display() | ||
+ bool poll_event(sf::Event&) | ||
+ void close() | ||
+ void create(sf::VideoMode, const sf::String& title) | ||
} | ||
|
||
class SfmlWindowFacade | ||
SfmlWindowFacade --|> SfmlWindow | ||
SfmlWindowFacade *-down- sf.Window | ||
|
||
class SfmlRenderTarget | ||
SfmlRenderTarget -down-|> sf.RenderTarget | ||
|
||
|
||
class SfmlRectangleShape{ | ||
+ Position2f getPosition() | ||
+ Size2f getSize() | ||
} | ||
SfmlRectangleShape --|> sf.RectangleShape | ||
|
||
} | ||
class WindowSfml | ||
WindowSfml --|> Window | ||
WindowSfml *-- SfmlWindow | ||
|
||
interface ContextRenderer{ | ||
+ initialize() | ||
+ clear(const sf::Color&) | ||
+ draw(const SfmlRectangleShape&) | ||
} | ||
ContextRenderer --> SfmlRectangleShape | ||
ContextRenderer <|-- SfmlRenderTarget | ||
|
||
class RendererPoolSfml{ | ||
} | ||
RendererPoolSfml --|> RendererPool | ||
RendererPoolSfml o-- RendererId | ||
RendererPoolSfml o-- SfmlRectangleShape | ||
RendererPoolSfml *-- RendererIdGenerator | ||
RendererPoolSfml *-- ContextRenderer | ||
|
||
class RendererIdGenerator | ||
RendererIdGenerator --> RendererId | ||
} | ||
|
||
|
||
} | ||
|
||
@enduml |
Submodule GSL
updated
30 files
+1 −0 | .gitignore | |
+0 −3 | .gitmodules | |
+15 −2 | .travis.yml | |
+58 −3 | CMakeLists.txt | |
+10 −7 | README.md | |
+39 −0 | ThirdPartyNotices.txt | |
+5 −6 | appveyor.yml | |
+63 −27 | include/gsl/gsl | |
+14 −11 | include/gsl/gsl_algorithm | |
+15 −15 | include/gsl/gsl_assert | |
+53 −32 | include/gsl/gsl_byte | |
+18 −34 | include/gsl/gsl_util | |
+115 −102 | include/gsl/multi_span | |
+124 −141 | include/gsl/span | |
+79 −208 | include/gsl/string_span | |
+72 −24 | tests/CMakeLists.txt | |
+127 −132 | tests/algorithm_tests.cpp | |
+33 −40 | tests/assertion_tests.cpp | |
+59 −63 | tests/at_tests.cpp | |
+55 −63 | tests/bounds_tests.cpp | |
+76 −80 | tests/byte_tests.cpp | |
+1,253 −1,254 | tests/multi_span_tests.cpp | |
+249 −67 | tests/notnull_tests.cpp | |
+34 −31 | tests/owner_tests.cpp | |
+1,183 −1,192 | tests/span_tests.cpp | |
+577 −573 | tests/strided_span_tests.cpp | |
+908 −709 | tests/string_span_tests.cpp | |
+18 −0 | tests/test.cpp | |
+0 −1 | tests/unittest-cpp | |
+60 −69 | tests/utils_tests.cpp |
Submodule glm
updated
1052 files
Oops, something went wrong.