MCPcopy Create free account
hub / github.com/doldecomp/mkdd / calc

Method calc

src/Osako/ErrorViewApp.cpp:76–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74void ErrorViewApp::draw() { mDvdError->draw(); }
75
76void ErrorViewApp::calc()
77{
78 // another function with 3 nested switches, great
79 switch (mErrorState)
80 {
81 case 0:
82 mFadeStatus = SYSTEM_GetFaderStatus();
83 SYSTEM_GetFader()->setStatus(JUTFader::Status_In, 0);
84 mErrorState = 1;
85 _14 = 0;
86 System::haltRumble();
87 case 1:
88 switch (msErrorId)
89 {
90 case ERROR_COVER_OPEN:
91 case ERROR_NO_DISK:
92 case ERROR_WRONG_DISK:
93 case ERROR_RETRY:
94 case ERROR_FATAL:
95 if (System::msDvdState == 1)
96 {
97 AppMgr::setNextApp(AppMgr::getPrevApp()); // Inline?
98 switch (mFadeStatus)
99 {
100 case JUTFader::Status_Out:
101 case JUTFader::Status_FadingOut:
102 SYSTEM_GetFader()->setStatus(JUTFader::Status_Out, 0);
103 break;
104 case JUTFader::Status_In:
105 case JUTFader::Status_FadingIn:
106 SYSTEM_GetFader()->setStatus(JUTFader::Status_In, 0);
107 break;
108 }
109 msErrorId = ERROR_NONE;
110 mErrorState = 0;
111 break;
112 }
113 mDvdError->init(msErrorId);
114 mDvdError->calc();
115 break;
116 case ERROR_LA_TRANSFER:
117 case ERROR_LA_TRANSFER2:
118 case ERROR_LA_ROUTER:
119 case ERROR_LA_CONNECTED:
120 case ERROR_LA_CONNECTION:
121 if (NetGameMgr::ptr()->getState() == 0x14)
122 mDvdError->init(0xc); // ERROR_LA_DISCONNECT_LINK?
123 else
124 {
125 mDvdError->init(msErrorId);
126 mErrorState = 2;
127 }
128 mDvdError->calc();
129 }
130 break;
131 case 2:
132 if (gGamePad1P.testTrigger(PAD_BUTTON_A))
133 {

Callers

nothing calls this directly

Calls 5

testTriggerMethod · 0.80
haltRumbleFunction · 0.70
setStatusMethod · 0.45
initMethod · 0.45
getStateMethod · 0.45

Tested by

no test coverage detected