persona-3-dual
A DS demake of Persona 3
Loading...
Searching...
No Matches
UIScreen.cpp
Go to the documentation of this file.
1#include "UIScreen.hpp"
2
6
10
12{
13 if (oam == nullptr)
14 {
15 return;
16 }
17 oamClear(oam, 0, 0);
18}
19
20int UIScreen::onTouch(touchPosition* touch)
21{
22 return -1;
23}
24
25void UIScreen::moveSprite(int spriteId, int x, int y)
26{
27 if (oam == nullptr)
28 {
29 return;
30 }
31 oamSetXY(oam, spriteId, x, y);
32}
33
34void UIScreen::showSprite(int spriteId)
35{
36 if (oam == nullptr)
37 {
38 return;
39 }
40 oamSetHidden(oam, spriteId, false);
41}
42
43void UIScreen::hideSprite(int spriteId)
44{
45 if (oam == nullptr)
46 {
47 return;
48 }
49 oamSetHidden(oam, spriteId, true);
50}
UIAction
Definition UITypes.hpp:23
virtual void triggerAction(UIAction action)
Trigger an action to be handled.
Definition UIScreen.cpp:3
virtual int onTouch(touchPosition *touch)
Hook to allow touch response.
Definition UIScreen.cpp:20
void removeSprites()
Clears the displayed sprites from the screen.
Definition UIScreen.cpp:11
void hideSprite(int spriteId)
Hides the specified sprite on the screen.
Definition UIScreen.cpp:43
OamState * oam
Definition UIScreen.hpp:12
void moveSprite(int spriteId, int x, int y)
Moves the specified sprite to the specified position on the screen.
Definition UIScreen.cpp:25
virtual void renderSprites()
Applys sprite colour palette & draws sprites to screen.
Definition UIScreen.cpp:7
void showSprite(int spriteId)
Shows the specified sprite on the screen.
Definition UIScreen.cpp:34