persona-3-dual
A DS demake of Persona 3
Loading...
Searching...
No Matches
DialogueComponent.hpp
Go to the documentation of this file.
1
6
7#pragma once
8
12#include "types/aeTypes.hpp"
13
14#include <aegis/component.hpp>
15
16class DialogueComponent : public ae::Component
17{
18 public:
19 static constexpr ae::ComponentTypeID TYPE_ID = static_cast<ae::ComponentTypeID>(ComponentType::Dialogue);
20 void init() override;
21
22 void destroy() override;
23
29 void update(ae::q20_12_t /*dt*/) override;
30
31 ae::ComponentTypeID getType() const override
32 {
33 return TYPE_ID;
34 }
35
43 void configureDialogue(const DialogueConfig& config);
44
52 void start(Dialogue* firstLine);
53
57 void end();
58
59 protected:
60 void submitToManager() override
61 {
62 }
63
64 private:
72 void advanceTo(Dialogue* next);
73
77 void renderAnimFrame();
78
87 bool skipOrContinueText();
88
92 void renderOptions();
93
94 Dialogue* current = nullptr;
95 int optionCount = 0;
97 bool doRenderOptions = false;
98
100 bool renderBust = true;
101 bool opening = false;
102 bool closing = false;
103
104 u32 prevKeys = 0;
105
109};
Orchestrates rendering text from a bitmap.
void start(Dialogue *firstLine)
Start the currently loaded dialogue.
bool skipOrContinueText()
Handle input while the line is still being displayed.
ae::ComponentTypeID getType() const override
bool renderBust
track the currently loaded bust
static constexpr ae::ComponentTypeID TYPE_ID
void update(ae::q20_12_t) override
Core update loop that renders & advances through dialogue.
TextComponent * textAlt
DialogueScreen * screen
void submitToManager() override
void end()
End the dialogue display.
void configureDialogue(const DialogueConfig &config)
Configure the dialogue system.
void renderAnimFrame()
Animate in the dialogue text on appear.
void renderOptions()
Display the DialogueSelection options.
void destroy() override
void advanceTo(Dialogue *next)
Transition to a new Dialogue node and reset animation state.
A struct that holds initial config values for the DialogueComponent.
Holds dialogue content and branching data.