Skip to content

Commit

Permalink
V0.4 (#158)
Browse files Browse the repository at this point in the history
* [VgaTerminal] add writeXY overload methods

* [VgaTerminal | optimization] write char only if different

* update to v0.4.0

* update examples. Fixes #156

* update README.md

* update cmake config

* [VgaTerminal | writeXY ] add overload methods

* update README

* add write{,XY} tests
  • Loading branch information
Raffaello authored May 26, 2020
1 parent b81e84f commit 62bc96c
Show file tree
Hide file tree
Showing 11 changed files with 594 additions and 478 deletions.
79 changes: 39 additions & 40 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,40 +1,39 @@
cmake_minimum_required (VERSION 3.16)

if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "")
endif()

project ("sdl2-vga-terminal" VERSION 0.3.0 DESCRIPTION "Vga Terminal on SDL2")


################################ Packages ####################################
set (CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(CPACK_SYSTEM_NAME win64)
else()
set(CPACK_SYSTEM_NAME win32)
endif()
endif()
set(CPACK_PACKAGE_FILE_NAME ${CMAKE_PROJECT_NAME}-${CMAKE_PROJECT_VERSION}-${CPACK_SYSTEM_NAME}-${CMAKE_BUILD_TYPE})
set(CPACK_SOURCE_GENERATOR "ZIP")
set(CPACK_GENERATOR "ZIP")
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${CMAKE_PROJECT_DESCRIPTION})
include(CPack)


################################# Options ####################################
option(BUILD_SHARED_LIBS "build shared libs with C inteface" ON)
option(BUILD_EXAMPLES "build examples" ON)
include(CTest)
option(ENABLE_CODE_COVERAGE "compile Debug with code coverage" OFF)
option(BUILD_SNAPSHOT "build snapshot test" OFF)
include(CMakeDependentOption)
CMAKE_DEPENDENT_OPTION(TEST_DUMP_SNAPSHOT "build test to dump the expected output instead of verifing it" OFF
"BUILD_SNAPSHOT" OFF)
option(WITH_SDL2_STATIC "linking STATIC LIB with SDL2 STATIC" OFF)
option(HAVE_PRECISE_TIMER "if SDL2 timers are precise" ON)

enable_testing()
add_subdirectory ("sdl2-vga-terminal")
cmake_minimum_required (VERSION 3.16)

if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE)
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "")
endif()

project ("sdl2-vga-terminal" VERSION 0.4.0 DESCRIPTION "Vga Terminal on SDL2")


################################ Packages ####################################
set (CPACK_SYSTEM_NAME ${CMAKE_SYSTEM_NAME})
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
set(CPACK_SYSTEM_NAME win64)
else()
set(CPACK_SYSTEM_NAME win32)
endif()
endif()
set(CPACK_PACKAGE_FILE_NAME ${CMAKE_PROJECT_NAME}-${CMAKE_PROJECT_VERSION}-${CPACK_SYSTEM_NAME}-${CMAKE_BUILD_TYPE})
set(CPACK_SOURCE_GENERATOR "ZIP")
set(CPACK_GENERATOR "ZIP")
set(CPACK_RESOURCE_FILE_README "${CMAKE_SOURCE_DIR}/README.md")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${CMAKE_PROJECT_DESCRIPTION})
include(CPack)


################################# Options ####################################
option(BUILD_SHARED_LIBS "build shared libs with C inteface" ON)
option(BUILD_EXAMPLES "build examples" ON)
include(CTest)
option(ENABLE_CODE_COVERAGE "compile Debug with code coverage" OFF)
option(BUILD_SNAPSHOT "build snapshot test" OFF)
include(CMakeDependentOption)
CMAKE_DEPENDENT_OPTION(TEST_DUMP_SNAPSHOT "build test to dump the expected output instead of verifing it" OFF
"BUILD_SNAPSHOT" OFF)
option(WITH_SDL2_STATIC "linking STATIC LIB with SDL2 STATIC" OFF)
option(HAVE_PRECISE_TIMER "if SDL2 timers are precise" ON)

add_subdirectory ("sdl2-vga-terminal")
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,11 @@ This is a TUI screenshot used in the snapshot test too.

![alt text](./sdl2-vga-terminal/test/snapshot/TuiTerminal.Snapshot.png "Title")

## Done with

- [VT-snake](https://dev.azure.com/raffaellobertini/sdl2-vga-terminal/_git/VT-snake) retro-gaming style snake in an emulated DOS Text Mode

## Projects Idea to be done in the future

- `VT Snake` (retro-gaming style snake in an emulated DOS Text Mode)
- `VT Tetris` (retro-gaming style Tetris in an emulated DOS Text Mode)
- `VT Pong` (retro-gaming style Pong in an emulated DOS Text Mode)
Loading

0 comments on commit 62bc96c

Please sign in to comment.