persona-3-dual
A DS demake of Persona 3
Loading...
Searching...
No Matches
IntroView.hpp
Go to the documentation of this file.
1#pragma once
6#include "core/timer.hpp"
10#include "views/BaseView.hpp"
11
12#include <etl/array.h>
13
14class IntroView : public BaseView
15{
16 private:
20 bool skyFadeIn = false;
21
23 // 64
26 etl::array<SpriteRenderState, 2> spriteRenderStates = {srs0, srs1};
27
28 int bg[4];
29
30 // sub screen
35
36 // for silhouette animation
37 int silhouetteX = -256;
38 int silhouetteY = 192;
39
40 // for bottom screen text animation
41 bool animateText = false;
42 int duration = 4;
44 int textAlpha = 0;
46
47 // for logoSprite
48 bool displayLogo = false;
49 int logoOpacity = 0;
50
51 // for overlayBackground
52 bool displayOverlay = false;
54 // NOTE: we use u16 to allow overflow (and naturally reset values back to 0)
55 u16 waveAngle = 0;
57 int baseSpeed = 20;
58 int fluctuation = 50;
59
60 // text
61 std::string FONT_NAME = "cosmetica";
62 int FONT_SIZE = 24;
63
64 ae::Entity* intro = nullptr;
66 TextComponent* text = nullptr;
67
68 MathManager& math = MathManager::getInstance();
69 UIManager& ui = UIManager::getInstance();
72
73 public:
74 void init() override;
75 ViewState update() override;
76 void cleanup() override;
77};
Orchestrates graphic loading and management.
Orchestrates music.
Orchestrates sfx.
ViewState
Definition StateTypes.hpp:4
TransitionPhase
Orchestrates rendering text from a bitmap.
Manager for hardware specific rendering functions related to the UI.
ViewState nextViewState
Definition IntroView.hpp:19
int baseSpeed
Definition IntroView.hpp:57
int durationCounter
Definition IntroView.hpp:43
SFXComponent * sfxCmpt
Definition IntroView.hpp:71
bool displayLogo
Definition IntroView.hpp:48
MusicComponent * musicCmpt
Definition IntroView.hpp:70
u16 waveAngle
Definition IntroView.hpp:55
void init() override
Definition IntroView.cpp:11
Sprite logoSprite[2]
Definition IntroView.hpp:22
ViewState update() override
TextComponent * text
Definition IntroView.hpp:66
bool skyFadeIn
Definition IntroView.hpp:20
void cleanup() override
bool animateText
Definition IntroView.hpp:41
int silhouetteY
Definition IntroView.hpp:38
int FONT_SIZE
Definition IntroView.hpp:62
etl::array< SpriteRenderState, 2 > spriteRenderStates
Definition IntroView.hpp:26
int logoOpacity
Definition IntroView.hpp:49
GraphicsComponent * graphics
Definition IntroView.hpp:65
int bgSubLogo
Definition IntroView.hpp:31
std::string FONT_NAME
Definition IntroView.hpp:61
int bg[4]
Definition IntroView.hpp:28
int overlayOpacity
Definition IntroView.hpp:53
int textAlphaDirection
Definition IntroView.hpp:45
Timer fadeTimer
Definition IntroView.hpp:17
SpriteRenderState srs1
Definition IntroView.hpp:25
int fluctuation
Definition IntroView.hpp:58
ae::Entity * intro
Definition IntroView.hpp:64
UIManager & ui
Definition IntroView.hpp:69
int textAlpha
Definition IntroView.hpp:44
TransitionPhase transitionPhase
Definition IntroView.hpp:18
SpriteRenderState srs0
Definition IntroView.hpp:24
u16 currentRotation
Definition IntroView.hpp:56
bool displayOverlay
Definition IntroView.hpp:52
int silhouetteX
Definition IntroView.hpp:37
int bgSubText
Definition IntroView.hpp:33
MathManager & math
Definition IntroView.hpp:68
uint16_t * textVideoBufferSub
Definition IntroView.hpp:34
Data to render a Sprite.
A simple sprite structure.
Timer util to track if a duration has passed.