@@ -992,7 +992,7 @@ void displayFrameCounter()
992
992
drawFunctionOnDebugLayer (drawFrameCounter);
993
993
}
994
994
995
- void displayMarioCoordinatesBoolCheck ()
995
+ void displayMarioCoordinates ()
996
996
{
997
997
if (!Displays[MARIO_COORDINATES])
998
998
{
@@ -1117,7 +1117,7 @@ void displayYoshiSkipDetails()
1117
1117
else
1118
1118
{
1119
1119
ttyd::mario::Player *player = ttyd::mario::marioGetPtr ();
1120
- bool MarioControl = player->flags1 & (1 << 0 ); // Check if 0 bit is active
1120
+ bool MarioControl = player->flags1 & (1 << 0 ); // Check if 0 bit is set
1121
1121
1122
1122
if (MarioControl && YoshiSkip.TimerPaused )
1123
1123
{
@@ -1204,6 +1204,113 @@ void displayPalaceSkipDetails()
1204
1204
drawFunctionOnDebugLayer (drawPalaceSkipDetails);
1205
1205
}
1206
1206
1207
+ void displayBridgeSkipDetails ()
1208
+ {
1209
+ if (!Displays[BRIDGE_SKIP])
1210
+ {
1211
+ return ;
1212
+ }
1213
+
1214
+ ttyd::mario::Player *player = ttyd::mario::marioGetPtr ();
1215
+ bool unkNoLongerOnGround = player->flags2 & (1 << 28 ); // Check if 28 bit is set
1216
+ bool unkNotAbleToJump = player->flags2 & (1 << 16 ); // Check if 16 bit is set
1217
+
1218
+ if (!unkNoLongerOnGround && unkNotAbleToJump) // Done falling, now starting to stand up
1219
+ {
1220
+ if (!BridgeSkip.PressedEarly )
1221
+ {
1222
+ // Reset the timer upon landing and while not pressing A
1223
+ BridgeSkip.MainTimer = 0 ;
1224
+
1225
+ // Check if A was pressed too early
1226
+ if (BridgeSkip.TimerPaused && BridgeSkip.TimerStopped )
1227
+ {
1228
+ // Pressed A too early, so start the timer
1229
+ BridgeSkip.PressedEarly = true ;
1230
+ BridgeSkip.TimerPaused = false ;
1231
+ BridgeSkip.TimerStopped = false ;
1232
+ }
1233
+ else
1234
+ {
1235
+ // Stop the timer
1236
+ BridgeSkip.TimerPaused = true ;
1237
+ BridgeSkip.TimerStopped = false ;
1238
+ }
1239
+ }
1240
+ else if (BridgeSkip.PressedEarlyShouldDisable )
1241
+ {
1242
+ // Reset the early state
1243
+ BridgeSkip.TimerPaused = true ;
1244
+ BridgeSkip.PressedEarly = false ;
1245
+ BridgeSkip.PressedEarlyShouldDisable = false ;
1246
+ BridgeSkip.TimerStopped = false ;
1247
+ }
1248
+ else
1249
+ {
1250
+ // The timer is currently running
1251
+ }
1252
+ }
1253
+ else if (!unkNoLongerOnGround && !unkNotAbleToJump) // A timing, start timer
1254
+ {
1255
+ if (!BridgeSkip.PressedEarly )
1256
+ {
1257
+ if (BridgeSkip.TimerPaused ) // Prevents running when the display is initially enabled
1258
+ {
1259
+ if (!BridgeSkip.TimerStopped )
1260
+ {
1261
+ // Didn't press A, so start the timer
1262
+ BridgeSkip.TimerPaused = false ;
1263
+ }
1264
+ else if (!(player->flags2 & (1 << 17 ))) // Check if 17 bit is not set; unkCurrentlyJumping
1265
+ {
1266
+ // Pressed A one frame early
1267
+ BridgeSkip.PressedEarly = true ;
1268
+ BridgeSkip.PressedEarlyShouldDisable = true ;
1269
+ }
1270
+ else
1271
+ {
1272
+ // Pressed A on the correct frame, so leave the timer paused
1273
+ }
1274
+ }
1275
+ }
1276
+ else
1277
+ {
1278
+ // Stop the timer
1279
+ BridgeSkip.TimerPaused = true ;
1280
+ BridgeSkip.PressedEarlyShouldDisable = true ;
1281
+ }
1282
+ }
1283
+
1284
+ if (checkButtonCombo (PAD_A))
1285
+ {
1286
+ // Stop when A is pressed
1287
+ BridgeSkip.TimerStopped = true ;
1288
+ }
1289
+
1290
+ if (checkButtonComboEveryFrame (PAD_Y))
1291
+ {
1292
+ // Hold Y to increment the reset counter
1293
+ BridgeSkip.ResetTimer ++;
1294
+ }
1295
+ else
1296
+ {
1297
+ BridgeSkip.ResetTimer = 0 ;
1298
+ }
1299
+
1300
+ if (BridgeSkip.ResetTimer > secondsToFrames (2 ))
1301
+ {
1302
+ // Reset the timer when button is held for 2 seconds
1303
+ BridgeSkip.MainTimer = 0 ;
1304
+ BridgeSkip.ResetTimer = 0 ;
1305
+ BridgeSkip.PressedEarly = false ;
1306
+ BridgeSkip.PressedEarlyShouldDisable = false ;
1307
+ BridgeSkip.TimerPaused = false ;
1308
+ BridgeSkip.TimerStopped = true ;
1309
+ }
1310
+
1311
+ drawFunctionOnDebugLayer (drawBridgeSkipDetails);
1312
+ }
1313
+
1207
1314
void displayBlimpTicketSkipDetails ()
1208
1315
{
1209
1316
if (!Displays[BLIMP_TICKET_SKIP])
0 commit comments