I was unhappy with the previous API for font rendering (TextBuffer class), which was C-style and verbose in usage.
This MR introduces TextComponent, as in the component pattern, that will be included into each GameEntity that wishes to render text. It is RAII (no special action required to create or dispose it) - will render text as soon as set_text is called with any non-empty string, and will cease to render as soon as its destructor is called.
I was unhappy with the previous API for font rendering (
TextBuffer
class), which was C-style and verbose in usage.This MR introduces
TextComponent
, as in the component pattern, that will be included into eachGameEntity
that wishes to render text. It is RAII (no special action required to create or dispose it) - will render text as soon asset_text
is called with any non-empty string, and will cease to render as soon as its destructor is called.Former
TextBuffer
is to be removed.Relates to: https://github.com/dbeef/spelunky-psp/pull/59