persona-3-dual
A DS demake of Persona 3
Loading...
Searching...
No Matches
BaseView.hpp
Go to the documentation of this file.
1#pragma once
3
5{
6 public:
7 // the destructor (runs when we delete a view)
8 // viritual is used for overriding functions (polymorphism)
9 // in this case, it allows child classes instances (ex. IntroView) to be properly cleaned up when referred throguh the parent (View) class
10 virtual ~BaseView() = default;
11
12 // abstract methods, as marked by "= 0"
13 virtual void init() = 0; // view setup
14 virtual ViewState update() = 0; // view update
15 virtual void cleanup(); // view cleanup
16
20 virtual bool usesBaseFadeIn() const
21 {
22 return false;
23 }
24
25 void startFadeIn();
26 void updateFadeIn();
27
28 private:
29 int fadeBrightness = -16;
30};
ViewState
Definition StateTypes.hpp:4
int fadeBrightness
Definition BaseView.hpp:29
virtual ~BaseView()=default
virtual ViewState update()=0
virtual void cleanup()
Definition BaseView.cpp:8
virtual void init()=0
virtual bool usesBaseFadeIn() const
Whether BaseView should drive a dual-engine brightness fade-in.
Definition BaseView.hpp:20
void updateFadeIn()
Definition BaseView.cpp:60
void startFadeIn()
Definition BaseView.cpp:49