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

Method edit

src/Osako/NameEntryHelper.cpp:39–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39void NameEntryHelper::edit() {
40 if (mGamePad->testButton(JUTGamePad::MAINSTICK_UP)) {
41 mDrums[mDrumIdx]->scrollUp();
42 } else if (mGamePad->testButton(JUTGamePad::MAINSTICK_DOWN)) {
43 mDrums[mDrumIdx]->scrollDown();
44 }
45
46 if (mGamePad->testTrigger(JUTGamePad::A)) {
47 mDrums[mDrumIdx]->selectOut();
48 if (mDrumIdx == 2) {
49 GetGameAudioMain()->startSystemSe(0x20003);
50
51 for (int i = 0; i < 3; i++)
52 maText[i] = mDrums[i]->getChar();
53
54 mAction = 3;
55 }
56 else {
57 GetGameAudioMain()->startSystemSe(0x2000c);
58 mDrumIdx++;
59 mDrums[mDrumIdx]->selectIn();
60 }
61 } else if (mGamePad->testTrigger(JUTGamePad::B)) {
62 if (mDrumIdx == 0) {
63 if (mGameSelect) { // in award mode, you can't exit out of the Name entry
64 GetGameAudioMain()->startSystemSe(0x20005);
65 mDrums[mDrumIdx]->selectOut();
66 mAction = 4;
67 }
68 }
69 else {
70 GetGameAudioMain()->startSystemSe(0x2000c);
71 mDrums[mDrumIdx]->selectOut();
72 mDrumIdx--;
73 mDrums[mDrumIdx]->selectIn();
74 }
75 }
76
77}
78
79void NameEntryHelper::calc() {
80 switch(mAction) {

Callers

nothing calls this directly

Calls 8

testButtonMethod · 0.80
testTriggerMethod · 0.80
startSystemSeMethod · 0.80
getCharMethod · 0.80
scrollUpMethod · 0.45
scrollDownMethod · 0.45
selectOutMethod · 0.45
selectInMethod · 0.45

Tested by

no test coverage detected