persona-3-dual
A DS demake of Persona 3
Loading...
Searching...
No Matches
TextManager.hpp
Go to the documentation of this file.
1
6
7#pragma once
8#include "types/TextTypes.hpp"
9#include <aegis/manager.hpp>
10#include <memory>
11
13
14class TextManager : public ae::Manager, public ae::Singleton<TextManager>
15{
16 public:
17 void init() override
18 {
19 }
20
21 void process() override
22 {
23 }
24
25 void shutdown() override
26 {
27 }
28
37 std::unique_ptr<Font> loadFont(std::string* name, int size);
38
42 void loadDefaultPalette();
43
51 bool loadPalette(std::string* paletteFilePath, bool sub = false);
52
57 void unloadPalette();
58
64 std::uint8_t* loadFontBitmap(std::string* path);
65
73 bool loadFontMetadata(std::string* path, Font* font, bool forBoldBitmap = false);
74
79 void clearScreen(uint16_t* videoBuffer);
80
81 private:
82 friend class Singleton<TextManager>;
83 TextManager() = default;
84
85 IOManager& io = IOManager::getInstance();
86
94 int extractIntValue(const std::string& line, const std::string& key);
95};
Manager for IO functions.
IOManager & io
TextManager()=default
void unloadPalette()
Unload the current palettes.
void process() override
void init() override
void shutdown() override
int extractIntValue(const std::string &line, const std::string &key)
Extract an integer value from a line of text based on a specified key.
void loadDefaultPalette()
Loads the predefined default palette.
bool loadPalette(std::string *paletteFilePath, bool sub=false)
Load a palette from a file.
std::unique_ptr< Font > loadFont(std::string *name, int size)
Load a font from a file.
void clearScreen(uint16_t *videoBuffer)
Clear the text layer by filling the video buffer with black.
bool loadFontMetadata(std::string *path, Font *font, bool forBoldBitmap=false)
Load the font metadata from a file.
std::uint8_t * loadFontBitmap(std::string *path)
Load the font bitmap from a file.
Stores data for a font.
Definition TextTypes.hpp:69