CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: hrydgard/ppsspp
Path: blob/master/Core/Dialog/PSPNpSigninDialog.h
Views: 1401
1
// Copyright (c) 2012- PPSSPP Project.
2
3
// This program is free software: you can redistribute it and/or modify
4
// it under the terms of the GNU General Public License as published by
5
// the Free Software Foundation, version 2.0 or later versions.
6
7
// This program is distributed in the hope that it will be useful,
8
// but WITHOUT ANY WARRANTY; without even the implied warranty of
9
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
// GNU General Public License 2.0 for more details.
11
12
// A copy of the GPL 2.0 should have been included with the program.
13
// If not, see http://www.gnu.org/licenses/
14
15
// Official git repository and contact information can be found at
16
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
17
18
#pragma once
19
20
#include "Core/Dialog/PSPDialog.h"
21
#include "Core/MemMapHelpers.h"
22
23
24
struct SceUtilityNpSigninParam {
25
pspUtilityDialogCommon common;
26
// Initially all zero? Or is there a possibility for one of these unknown to be a buffer to a packet data if it wasn't null?
27
int npSigninStatus;
28
int unknown1;
29
int unknown2;
30
int unknown3;
31
};
32
33
34
class PSPNpSigninDialog: public PSPDialog {
35
public:
36
PSPNpSigninDialog(UtilityDialogType type);
37
~PSPNpSigninDialog();
38
39
int Init(u32 paramAddr);
40
int Update(int animSpeed) override;
41
int Shutdown(bool force = false) override;
42
void DoState(PointerWrap &p) override;
43
pspUtilityDialogCommon* GetCommonParam() override;
44
45
protected:
46
bool UseAutoStatus() override {
47
return false;
48
}
49
50
private:
51
void DisplayMessage(std::string_view text1, std::string_view text2a = "", std::string_view text2b = "", std::string_view text3a = "", std::string_view text3b = "", bool hasYesNo = false, bool hasOK = false);
52
void DrawBanner();
53
void DrawIndicator();
54
void DrawLogo();
55
56
SceUtilityNpSigninParam request = {};
57
u32 requestAddr = 0;
58
//int npSigninResult = -1;
59
60
int yesnoChoice = 0;
61
float scrollPos_ = 0.0f;
62
int framesUpHeld_ = 0;
63
int framesDownHeld_ = 0;
64
65
u64 startTime = 0;
66
int step = 0;
67
};
68
69