@@ -1126,98 +1126,70 @@ void menuCheckButton()
1126
1126
case DPADDOWN:
1127
1127
case DPADUP:
1128
1128
{
1129
- if (tempSelectedOption != 0 )
1130
- {
1131
- adjustMarioStatsSelection (CurrentButton);
1132
- }
1129
+ adjustMarioStatsSelection (CurrentButton);
1133
1130
break ;
1134
1131
}
1135
1132
case A:
1136
1133
{
1137
- switch (tempSelectedOption )
1134
+ switch (tempMenuSelectedOption )
1138
1135
{
1139
1136
case 0 :
1140
1137
{
1141
- SelectedOption = tempCurrentMenuOption + 1 ;
1142
- CurrentMenuOption = 0 ;
1143
- break ;
1144
- }
1145
- default :
1146
- {
1147
- switch (tempMenuSelectedOption)
1138
+ MenuSelectedOption = tempCurrentMenuOption + 1 ;
1139
+ MenuSelectionStates = tempCurrentMenuOption + 1 ;
1140
+
1141
+ switch (tempCurrentMenuOption + 1 )
1148
1142
{
1149
- case 0 :
1143
+ case SPECIAL_MOVES :
1150
1144
{
1151
- MenuSelectedOption = tempCurrentMenuOption + 1 ;
1152
- MenuSelectionStates = tempCurrentMenuOption + 1 ;
1153
-
1154
- switch (tempCurrentMenuOption + 1 )
1155
- {
1156
- case SPECIAL_MOVES:
1157
- {
1158
- SecondaryMenuOption = 0 ;
1159
- break ;
1160
- }
1161
- default :
1162
- {
1163
- SecondaryMenuOption = getHighestAdjustableValueDigit (tempCurrentMenu) - 1 ;
1164
-
1165
- uint32_t offset = getMarioStatsValueOffset (tempCurrentMenuOption + 1 );
1166
- if (offset == 0 )
1167
- {
1168
- break ;
1169
- }
1170
-
1171
- // Set the current value in the display to the current value of the address being changed
1172
- if (((tempCurrentMenuOption + 1 ) >= PIANTAS_STORED) &&
1173
- ((tempCurrentMenuOption + 1 ) <= CURRENT_PIANTAS))
1174
- {
1175
- uint32_t PiantaParlorPtr = reinterpret_cast <uint32_t >(
1176
- ttyd::evt_yuugijou::yuugijouWorkPointer);
1177
-
1178
- MenuSecondaryValue = *reinterpret_cast <int32_t *>(PiantaParlorPtr + offset);
1179
- }
1180
- else
1181
- {
1182
- uint32_t PouchPtr = reinterpret_cast <uint32_t >(
1183
- ttyd::mario_pouch::pouchGetPtr ());
1184
-
1185
- MenuSecondaryValue = *reinterpret_cast <int16_t *>(PouchPtr + offset);
1186
- }
1187
- break ;
1188
- }
1189
- }
1145
+ SecondaryMenuOption = 0 ;
1190
1146
break ;
1191
1147
}
1192
1148
default :
1193
1149
{
1150
+ SecondaryMenuOption = getHighestAdjustableValueDigit (tempCurrentMenu) - 1 ;
1151
+
1152
+ uint32_t offset = getMarioStatsValueOffset (tempCurrentMenuOption + 1 );
1153
+ if (offset == 0 )
1154
+ {
1155
+ break ;
1156
+ }
1157
+
1158
+ // Set the current value in the display to the current value of the address being changed
1159
+ if (((tempCurrentMenuOption + 1 ) >= PIANTAS_STORED) &&
1160
+ ((tempCurrentMenuOption + 1 ) <= CURRENT_PIANTAS))
1161
+ {
1162
+ uint32_t PiantaParlorPtr = reinterpret_cast <uint32_t >(
1163
+ ttyd::evt_yuugijou::yuugijouWorkPointer);
1164
+
1165
+ MenuSecondaryValue = *reinterpret_cast <int32_t *>(PiantaParlorPtr + offset);
1166
+ }
1167
+ else
1168
+ {
1169
+ uint32_t PouchPtr = reinterpret_cast <uint32_t >(
1170
+ ttyd::mario_pouch::pouchGetPtr ());
1171
+
1172
+ MenuSecondaryValue = *reinterpret_cast <int16_t *>(PouchPtr + offset);
1173
+ }
1194
1174
break ;
1195
1175
}
1196
1176
}
1197
1177
break ;
1198
1178
}
1179
+ default :
1180
+ {
1181
+ break ;
1182
+ }
1199
1183
}
1200
1184
break ;
1201
1185
}
1202
1186
case B:
1203
1187
{
1204
1188
if (tempMenuSelectedOption == 0 )
1205
1189
{
1206
- switch (tempSelectedOption)
1207
- {
1208
- case 0 :
1209
- {
1210
- // Go back to the previous menu
1211
- CurrentMenu = tempPreviousMenu;
1212
- resetMenu ();
1213
- break ;
1214
- }
1215
- default :
1216
- {
1217
- closeSecondaryMenu ();
1218
- break ;
1219
- }
1220
- }
1190
+ // Go back to the previous menu
1191
+ CurrentMenu = tempPreviousMenu;
1192
+ resetMenu ();
1221
1193
}
1222
1194
break ;
1223
1195
}
@@ -3108,25 +3080,26 @@ void drawMenu()
3108
3080
case STATS_MARIO:
3109
3081
{
3110
3082
// Draw the text for the options
3111
- drawSingleColumnSelectedOption ();
3083
+ drawSingleColumnMain ();
3112
3084
3113
3085
// Draw each of Mario's stats
3114
3086
drawMarioStats ();
3115
3087
3116
- if (tempMenuSelectedOption != 0 )
3088
+ switch (tempMenuSelectedOption)
3117
3089
{
3118
- switch (tempMenuSelectedOption)
3090
+ case 0 :
3119
3091
{
3120
- case SPECIAL_MOVES:
3121
- {
3122
- drawMarioSpecialMovesOptions ();
3123
- break ;
3124
- }
3125
- default :
3126
- {
3127
- drawAdjustableValue (false , tempCurrentMenu);
3128
- break ;
3129
- }
3092
+ break ;
3093
+ }
3094
+ case SPECIAL_MOVES:
3095
+ {
3096
+ drawMarioSpecialMovesOptions ();
3097
+ break ;
3098
+ }
3099
+ default :
3100
+ {
3101
+ drawAdjustableValue (false , tempCurrentMenu);
3102
+ break ;
3130
3103
}
3131
3104
}
3132
3105
break ;
@@ -3382,7 +3355,7 @@ void drawMenu()
3382
3355
bool CurrentDisplay = Displays[tempMenuSelectedOption];
3383
3356
const char *CurrentLine = DisplaysLines[tempMenuSelectedOption];
3384
3357
3385
- int32_t PosY = 80 ;
3358
+ int32_t PosY = 100 ;
3386
3359
drawBoolOnOrOff (CurrentDisplay, CurrentLine, PosY);
3387
3360
3388
3361
// Draw each button combo
0 commit comments