Preview of Centurion 7.0.0
Pre-release
Pre-release
·
170 commits
to dev
since this release
This major release includes many naming changes and improvements, and many APIs have either been overhauled or removed.
Note, this list is incomplete.
General
- Added support for SDL 2.0.18 and 2.0.20
- Added support for SDL_ttf 2.0.18
- Removed support for amalgamated header mode
- Greatly reduced the amount of headers
- Removed comparison operators between Centurion and SDL2 enums
- Removed header
everything.hpp
- Removed header
macros.hpp
- Added more examples
🏗️ Common
- Added alias
bounded_array_ref
- Added alias
enable_for_enum_t
- Added
milliseconds
aliasesu16ms
,u32ms
, andu64ms
- Added Unicode aliases
unicode_t
andunicode32_t
- Renamed integer aliases
u8
->uint8
u16
->uint16
u32
->uint32
u64
->uint64
i8
->int8
i16
->int16
i32
->int32
i64
->int64
- Overhauled SFINAE helper aliases
enable_if_pointer_v
->enable_for_pointer_t
enable_if_convertible_t
->enable_for_convertible_t
- Replaced alias
enable_if_number_t
with variable templateis_number<T>
- Removed string aliases
str
,czstring
, andzstring
- Removed alias
not_null
- Overhauled literal operators
- Removed
_u8
,_u16
,_u32
,_u64
,_i8
,_i16
,_i32
, and_i64
- Removed
_ns
,_us
, and_s
- Put
_ms
literal operator in inline namespacetime_literals
(full qualification is nowcen::literals::time_literals
) _ms
literal operator now returnsu64ms
when using SDL 2.0.18 or later
- Removed
- Renamed
cen_error
toexception
Feature detection
- Removed macro
CENTURION_HAS_STD_MEMORY_RESOURCE
- Removed macro
CENTURION_HAS_FEATURE_MEMORY_RESOURCE
- Added macro
CENTURION_HAS_FEATURE_CHARCONV
Compiler
- Replaced
is_debug_build()
withis_debug_build
constant - Replaced
is_release_build()
withis_release_build
constant - Replaced
on_msvc()
withon_msvc
constant - Replaced
on_gcc()
withon_gcc
constant - Replaced
on_clang()
withon_clang
constant - Removed
on_emscripten()
- Removed
on_intel_cpp()
Initialization
- Removed hint API
- Removed
library
class, replaced bysdl
,img
,mix
, andttf
classes
Logging
- Added support for custom log categories
- Removed namespace
cen::log
log::reset_priorities()
->reset_priorities()
log::set_priority()
->set_priority()
log::get_priority()
->get_priority()
log::max_message_size()
->max_log_message_size()
log::msg()
->log()
log::error()
->log_error()
log::critical()
->log_critical()
log::warn()
->log_warn()
log::debug()
->log_debug()
log::info()
->log_info()
log::verbose()
->log_verbose()
- Removed
log::put()
- Removed
log::set_output_function()
- Removed
log::use_preset_output_function()
Math
- Replaced
basic_rect::isFloating
withbasic_rect::floating
- Replaced
basic_rect::isIntegral
withbasic_rect::integral
- Added new terse conversion functions
as_i()
/as_f()
to math types
Versioning
version
is no longer initalized to the current Centurion version by default- Added
current_version()
🔉 Audio
- Removed alias
channel_index
- Removed alias
group_index
- Removed alias
music_finished_callback
- Removed alias
channel_finished_callback
- Removed alias
sound_font_visit_callback
- Removed
set_sound_fonts()
- Removed
get_sound_fonts()
- Removed
each_sound_font()
- Removed namespace
cen::channels
and all of its functions
music
- Added alias
ms_type
- Added
is_fading_in()
- Added
is_fading_out()
- Removed explicit conversions to
Mix_Music*
andconst Mix_Music*
basic_sound_effect
- Added alias
ms_type
- Removed explicit conversions to
Mix_Chunk*
andconst Mix_Chunk*
🧶 Concurrency
- Removed alias
thread::id
👀 Events
- Renamed
common_event
toevent_base
- Renamed
event
toevent_handler
- Added support for user events (with custom type identifiers)
event_handler
- Added overload of
is()
accepting anevent_type
enumerator - Removed constructors accepting events
- Removed overload of
push()
accepting a non-const event handler - Added
raw_type()
- Renamed
is_empty()
toempty()
keyboard_event
- Renamed functions
set_scan_code()
->set_scan()
set_key_code()
->set_key()
set_button_state()
->set_state()
is_only_any_of_active()
->is_only_subset_active()
- Removed
get_scan_code()
- Removed
get_key_code()
📁 Filesystem
file_mode
- Renamed enumerators
read_existing
->r
read_existing_binary
->rb
write
->w
write_binary
->wb
append_or_create
->a
append_or_create_binary
->ab
read_write_existing
->rx
read_write_existing_binary
->rbx
read_write_replace
->wx
read_write_replace_binary
->wbx
read_append
->ax
read_append_binary
->abx
file_type
- Renamed enumerators
win32
->win
stdio
->std
🔡 Text
- Moved text rendering functions from
basic_renderer
tofont
- Removed rendering convenience functions from
font_cache
- Added experimental
font_bundle
class
🎮 Input
- Removed haptic API
- Removed
touch
namespace and all of its functions - Added class
finger
- Renamed
finger_state
tocontroller_finger_state
- Renamed
key_modifier
tokey_mod
(and removedkey_mod
alias) - Added
is_active(key_mod)
- Added
is_only_active(key_mod)
- Added
is_only_subset_active(key_mod)
key_mod
- Renamed enumerators
left_shift
->lshift
right_shift
->rshift
left_ctrl
->lctrl
right_ctrl
->rctrl
left_alt
->lalt
right_alt
->ralt
left_gui
->lgui
right_gui
->rgui
keyboard
- Renamed
update()
torefresh()
- Renamed
key_count()
tosize()
- Removed key modifier functions
is_active()
,is_only_active()
, andis_only_any_of_active()
mouse
- Added
warp()
- Added
warp_in_window()
- Added
set_relative_mode()
- Added
is_relative_mode_enabled()
- Added
update()
- Added
update(const basic_renderer&)
- Added
is_middle_pressed()
- Added
was_middle_released()
- Added
position_relative_window()
- Added
position_relative_desktop()
- Added
delta()
- Added
is_haptic()
- Renamed functions
is_left_button_pressed()
->is_left_pressed()
is_right_button_pressed()
->is_right_pressed()
was_left_button_released()
->was_left_released()
was_right_button_released()
->was_right_released()
- Removed
update(int, int)
- Removed
update(iarea)
- Removed
reset()
- Removed
set_logical_width()
- Removed
set_logical_height()
- Removed
set_logical_size()
- Removed
logical_width()
- Removed
logical_height()
- Removed
logical_size()
💻 System
- Removed namespace
cen::counter
counter::frequency()
->frequency()
counter::now()
->now()
counter::now_in_seconds()
->now_in_seconds()
counter::ticks()
->ticks32()
- Removed namespace
cen::clipboard
clipboard::has_text()
->has_clipboard()
clipboard::get_text()
->get_clipboard()
clipboard::set_text()
->set_clipboard()
- Removed namespace
cen::ram
ram::amount_mb()
->ram_mb()
ram::amount_gb()
->ram_gb()
- Added
ticks64()
Platform
- Renamed
platform_id
enumeratormac_osx
tomacos
Power
- Removed
battery::exists()
- Removed namespace
cen::battery
battery::seconds_left()
->battery_seconds()
battery::minutes_left()
->battery_minutes()
battery::percentage()
->battery_percentage()
battery::state()
->query_battery()
battery::is_available()
->is_battery_available()
battery::is_charging()
->is_battery_charging()
battery::is_charged()
->is_battery_charged()
🖥️ Video
- Renderers are now created using
basic_window::create_renderer()
- Textures are now created using
basic_renderer::create_texture()
- The
as_rgb()
,as_rgba()
, andas_argb()
functions incolor
now usestd::format
, if available - Removed
double
overload ofblend()
function
Rendering
- Removed font handling API from
basic_renderer
- Removed translated rendering API from
basic_renderer
- Removed text rendering functions from
basic_renderer
, and moved them tofont