Sista v3.0.0-alpha.1
Sista is a C++ lightweight OS-agnostic library for terminal animations and videogames
|
Here you can find the release notes for each version of Sista
since v0.1.0
, with changelog since v0.7.0
; these are listed in a bottom-up order.
Major release.
sista::Field
to use std::shared_ptr<sista::Pawn>
instead of raw pointers for memory safety and easier memory managementField::reset
method as it is redundant with Field::clear
in this contextstd::shared_ptr<sista::Pawn>
and std::make_shared<sista::Pawn>
for creating and managing pawnssista::Field
and sista::Pawn
usageANSI
namespace and moved all ANSI-related functionality to sista::
, among which ANSI::Settings
->sista::ANSISettings
_EFFECT
constants into a scoped enum class Effect
inside the sista
namespaceenum
types to enum class
for better type safety and to avoid name clashesCursor::move
overload using MoveCursorSCO
, which was incorrectly using int
instead of char
ANSI-Settings.hpp
and ANSI-Settings.cpp
to ansi.hpp
and ansi.cpp
respectively for consistency with other filenamessista::ANSISettings::apply()
for better readability and semantics with std::variant::holds_alternative
sista::Coord
type alias of std::pair<unsigned short, unsigned short>
to minimize the public surface area of the librarysista::Coord
as parametersista::Coordinates
to convert from and to std::pair<unsigned short, unsigned short>
y
and x
attributes from sista::Cursor
, as they were not used outside the struct nor necessary for its functionalitysista::Coordinates::set
to goTo
for better clarity (it moves the cursor to the coordinates)const
qualifier for references where appropriate for better performance and semanticsconst
qualifier to methods that do not modify the state of the object for better semantics and to allow calling them on const
instancessista::SwappableField::movingByCoordinates
to sista::Field
as it does not depend on SwappableField
functionalitystd::hash
specialization for sista::Coordinates
to allow its use in hash-based containers like std::unordered_map
and std::unordered_set
sista::SwappableField
internal logic for better performancesista::SwappableField
by making internal methods private and exposing only necessary public methodsMakefile
for hardcoding the rpath of the MacOS shared library to avoid issues with DYLD_LIBRARY_PATH
Makefile
to reflect the new filenames and ensure correct compilation and linkingvalgrind
, detected no memory leaks or invalid accessesPatch release.
Makefile
for MacOS installMinor release.
Sista
now available as a shared library on Windows via MinGW
, MSYS2
or alternative toolchainsThe previous state was that Sista
was only available in source format on Windows, but now it can be installed on the system as a shared library.
MSVC support is not available, and it won't for the foreseeable future unless there is a demand for it and a volunteer to test it.
shared-test-static
to test static linking against the Sista
librarydemo/Makefile
to include the new demo and to build it correctlyshared-test-static
demoMakefile
to correctly build the demos without the need for Sista
to be installeddemo/README.md
filedocs/
Minor release.
libSista.so
shared library from {PREFIX}/lib64/libSista.so
to {PREFIX}/lib/libSista.so
for ld
to find it correctly on most systemsuninstall
target to the Makefile
to remove the installed filesdemo/shared-test.cpp
and related Makefile
target to test the shared library installationMajor release.
libSista.so
, which can be installed in the system library pathBug fix release.
sista::Coordinates
operator overload <
to be a strict weak ordering relationThis change is necessary to ensure that constructs such as std::set<sista::Coordinates>
work correctly, as it requires a strict weak ordering relation.
We don't plan to implement an hash function for sista::Coordinates
at the moment as the direct comparison is more efficient and straightforward for the intended use cases.
ANSI::Settings
to be initialized with mixed ForegroundColor
and RGBColor
or RGBColor
and BackgroundColor
This change has the purpose to allow more flexibility, especially when using a custom foreground color with a coded background color.
<
comparison operator to sista::Coordinates
The purpose is to allow std::set<sista::Coordinates>
. It is based solely on the distance from the origin.
RGBColor
and support for it in the ANSI::Settings
structIt is now possible to initialize ANSI::Settings
instances as follows. Even if in general using the constructor could be a bless for backwards compatibility of your code.
The library does not enforce consistency across foreground and background indications, as in one of the two can be an RGBColor
and the other one a ForegroundColor
, for instance.
This change is backwards compatible, so the ForegroundColor
/BackgroundColor
based initialization is still functional and will always be supported.
sista::Field::removePawn(sista::Coordinates&)
to remove a pawn from the field by coordinates without the need of a pointer to the pawnsista::Field::erasePawn(sista::Coordinates&)
to erase a pawn from the field by coordinates without the need of a pointer to the pawnsista::Field::rePrintPawn()
sista::Coordinates
structsista::Coordinates
structsista::Field::erasePawn()
to remove and erase Pawn from the screen.hpp
headers and .cpp
sourcesThis should make it possible to use Sista in projects with multiple source files.
sista::Field::reset()
which was resizing the field to 0x0sista::Field::addPrintPawn()
to add and print Pawn without reprintsista::Field
instances, to empty the field from the sista::Pawn
sESC
constant to ANSI-Settings.hpp
I added the if statement to check if the attribute is BRIGHT
or not, because the BRIGHT
reset code is +21
(from set code) and the rest are +20
.
This is the first version of Sista
and it is still in development.