@@ -2373,6 +2373,239 @@ void NoteDataUtil::ConvertTapsToHolds( NoteData &inout, int iSimultaneousHolds,
2373
2373
inout.RevalidateATIs (vector<int >(), false );
2374
2374
}
2375
2375
2376
+ /* Need to redo parsing to handle multiple notes on a row
2377
+ skippping breaks it (Jacks generated)
2378
+ due to searching left/right it generates a lot of Left or right arrows which can also be jump jacks
2379
+ need creative solution or actual math */
2380
+ void NoteDataUtil::IcyWorld (NoteData &inout, StepsType st, TimingData const & timing_data, int iStartIndex, int iEndIndex)
2381
+ {
2382
+ // Row, tap column
2383
+ std::vector<tuple<int , int >> rowsWithNotes;
2384
+ int currentTap = -1 ;
2385
+
2386
+ FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE (inout, r, iStartIndex, iEndIndex)
2387
+ {
2388
+ currentTap = inout.GetNumTracksWithTap (r);
2389
+ if (currentTap != 1 )
2390
+ continue ; // skip
2391
+
2392
+ for (int q = 0 ; q < 4 ; q++)
2393
+ {
2394
+ const TapNote getTap = inout.GetTapNote (q, r);
2395
+ if (getTap.type == TapNoteType_Tap)
2396
+ {
2397
+ currentTap = q;
2398
+ break ;
2399
+ }
2400
+
2401
+ }
2402
+ rowsWithNotes.push_back (tuple<int , int >(r, currentTap));
2403
+ }
2404
+
2405
+ int lastTap = -1 ;
2406
+ bool flipStartSide = false ;
2407
+ bool skipLine = true ;
2408
+ int i = 0 ;
2409
+ for (auto iterator : rowsWithNotes)
2410
+ {
2411
+ // Every second row with note, insert a note which doesn't collide with the previous
2412
+ if (!skipLine)
2413
+ {
2414
+ int iNumTracksHeld = inout.GetNumTracksHeldAtRow (std::get<0 >(iterator));
2415
+ if (iNumTracksHeld >= 1 )
2416
+ {
2417
+ i++;
2418
+ continue ;
2419
+ }
2420
+
2421
+ int tempI = (i + 1 < rowsWithNotes.size () ? i + 1 : i);
2422
+ if (flipStartSide)
2423
+ {
2424
+ for (int c = 3 ; c >-1 ; c--)
2425
+ {
2426
+ if (c != lastTap && c != std::get<1 >(iterator) && c != std::get<1 >(rowsWithNotes.at (tempI)))
2427
+ {
2428
+ inout.SetTapNote (c, std::get<0 >(iterator), TAP_ADDITION_TAP);
2429
+ break ;
2430
+ }
2431
+ }
2432
+ }
2433
+ else
2434
+ {
2435
+ for (int c = 0 ; c < 4 ; c++)
2436
+ {
2437
+ if (c != lastTap && c != std::get<1 >(iterator) && c != std::get<1 >(rowsWithNotes.at (tempI)))
2438
+ {
2439
+ inout.SetTapNote (c, std::get<0 >(iterator), TAP_ADDITION_TAP);
2440
+ break ;
2441
+ }
2442
+ }
2443
+ }
2444
+ flipStartSide = !flipStartSide;
2445
+ }
2446
+ else
2447
+ {
2448
+ lastTap = std::get<1 >(iterator);
2449
+ }
2450
+ skipLine = !skipLine;
2451
+ i++;
2452
+ }
2453
+ inout.RevalidateATIs (vector<int >(), false );
2454
+ }
2455
+
2456
+ void NoteDataUtil::AnchorJS (NoteData &inout, StepsType st, TimingData const & timing_data, int iStartIndex, int iEndIndex)
2457
+ {
2458
+ // Row, tap column
2459
+ std::vector<tuple<int , int >> rowsWithNotes;
2460
+ int currentTap = -1 ;
2461
+
2462
+ FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE (inout, r, iStartIndex, iEndIndex)
2463
+ {
2464
+ currentTap = inout.GetNumTracksWithTap (r);
2465
+ if (currentTap != 1 )
2466
+ continue ; // skip
2467
+
2468
+ for (int q = 0 ; q < 4 ; q++)
2469
+ {
2470
+ const TapNote getTap = inout.GetTapNote (q, r);
2471
+ if (getTap.type == TapNoteType_Tap)
2472
+ {
2473
+ currentTap = q;
2474
+ break ;
2475
+ }
2476
+
2477
+ }
2478
+ rowsWithNotes.push_back (tuple<int , int >(r, currentTap));
2479
+ }
2480
+
2481
+ int lastTap = -1 ;
2482
+ bool flipStartSide = false ;
2483
+ bool skipLine = true ;
2484
+ int i = 0 ;
2485
+ for (auto iterator : rowsWithNotes)
2486
+ {
2487
+ // Every second row with note, insert a note which doesn't collide with the previous
2488
+ if (!skipLine)
2489
+ {
2490
+ int iNumTracksHeld = inout.GetNumTracksHeldAtRow (std::get<0 >(iterator));
2491
+ if (iNumTracksHeld >= 1 )
2492
+ {
2493
+ i++;
2494
+ continue ;
2495
+ }
2496
+
2497
+ int tempI = (i + 1 < rowsWithNotes.size () ? i + 1 : i);
2498
+ if (flipStartSide)
2499
+ {
2500
+ for (int c = 3 ; c >-1 ; c--)
2501
+ {
2502
+ if (c != lastTap && c != std::get<1 >(iterator) && c != std::get<1 >(rowsWithNotes.at (tempI)))
2503
+ {
2504
+ inout.SetTapNote (c, std::get<0 >(iterator), TAP_ADDITION_TAP);
2505
+ break ;
2506
+ }
2507
+ }
2508
+ }
2509
+ else
2510
+ {
2511
+ for (int c = 0 ; c < 4 ; c++)
2512
+ {
2513
+ if (c != lastTap && c != std::get<1 >(iterator) && c != std::get<1 >(rowsWithNotes.at (tempI)))
2514
+ {
2515
+ inout.SetTapNote (c, std::get<0 >(iterator), TAP_ADDITION_TAP);
2516
+ break ;
2517
+ }
2518
+ }
2519
+ }
2520
+ flipStartSide = !flipStartSide;
2521
+ }
2522
+ else
2523
+ {
2524
+ lastTap = std::get<1 >(iterator);
2525
+ }
2526
+ skipLine = !skipLine;
2527
+ i++;
2528
+ }
2529
+ inout.RevalidateATIs (vector<int >(), false );
2530
+ }
2531
+
2532
+ /* Same as AnchorJS, but it doesn't check if the next row will generate a jack.
2533
+ This causes mini jacks to be formed, with JS. c: */
2534
+ void NoteDataUtil::JackJS (NoteData &inout, StepsType st, TimingData const & timing_data, int iStartIndex, int iEndIndex)
2535
+ {
2536
+ // Row, tap column
2537
+ std::vector<tuple<int , int >> rowsWithNotes;
2538
+ int currentTap = -1 ;
2539
+
2540
+ FOREACH_NONEMPTY_ROW_ALL_TRACKS_RANGE (inout, r, iStartIndex, iEndIndex)
2541
+ {
2542
+ currentTap = inout.GetNumTracksWithTap (r);
2543
+ if (currentTap != 1 )
2544
+ continue ; // skip
2545
+
2546
+ for (int q = 0 ; q < 4 ; q++)
2547
+ {
2548
+ const TapNote getTap = inout.GetTapNote (q, r);
2549
+ if (getTap.type == TapNoteType_Tap)
2550
+ {
2551
+ currentTap = q;
2552
+ break ;
2553
+ }
2554
+
2555
+ }
2556
+ rowsWithNotes.push_back (tuple<int , int >(r, currentTap));
2557
+ }
2558
+
2559
+ int lastTap = -1 ;
2560
+ bool flipStartSide = false ;
2561
+ bool skipLine = true ;
2562
+ int i = 0 ;
2563
+ for (auto iterator : rowsWithNotes)
2564
+ {
2565
+ // Every second row with note, insert a note which doesn't collide with the previous
2566
+ if (!skipLine)
2567
+ {
2568
+ int iNumTracksHeld = inout.GetNumTracksHeldAtRow (std::get<0 >(iterator));
2569
+ if (iNumTracksHeld >= 1 )
2570
+ {
2571
+ i++;
2572
+ continue ;
2573
+ }
2574
+
2575
+ if (flipStartSide)
2576
+ {
2577
+ for (int c = 3 ; c >-1 ; c--)
2578
+ {
2579
+ if (c != lastTap && c != std::get<1 >(iterator))
2580
+ {
2581
+ inout.SetTapNote (c, std::get<0 >(iterator), TAP_ADDITION_TAP);
2582
+ break ;
2583
+ }
2584
+ }
2585
+ }
2586
+ else
2587
+ {
2588
+ for (int c = 0 ; c < 4 ; c++)
2589
+ {
2590
+ if (c != lastTap && c != std::get<1 >(iterator))
2591
+ {
2592
+ inout.SetTapNote (c, std::get<0 >(iterator), TAP_ADDITION_TAP);
2593
+ break ;
2594
+ }
2595
+ }
2596
+ }
2597
+ flipStartSide = !flipStartSide;
2598
+ }
2599
+ else
2600
+ {
2601
+ lastTap = std::get<1 >(iterator);
2602
+ }
2603
+ skipLine = !skipLine;
2604
+ i++;
2605
+ }
2606
+ inout.RevalidateATIs (vector<int >(), false );
2607
+ }
2608
+
2376
2609
void NoteDataUtil::Stomp ( NoteData &inout, StepsType st, int iStartIndex, int iEndIndex )
2377
2610
{
2378
2611
// Make all non jumps with ample space around them into jumps.
@@ -2390,7 +2623,7 @@ void NoteDataUtil::Stomp( NoteData &inout, StepsType st, int iStartIndex, int iE
2390
2623
{
2391
2624
// Look to see if there is enough empty space on either side of the note
2392
2625
// to turn this into a jump.
2393
- int iRowWindowBegin = r - BeatToNoteRow (0 .5f );
2626
+ int iRowWindowBegin = r - BeatToNoteRow (0 .5f ); // 0.5
2394
2627
int iRowWindowEnd = r + BeatToNoteRow (0 .5f );
2395
2628
2396
2629
bool bTapInMiddle = false ;
@@ -2416,6 +2649,7 @@ void NoteDataUtil::Stomp( NoteData &inout, StepsType st, int iStartIndex, int iE
2416
2649
inout.RevalidateATIs (vector<int >(), false );
2417
2650
}
2418
2651
2652
+
2419
2653
void NoteDataUtil::SnapToNearestNoteType ( NoteData &inout, NoteType nt1, NoteType nt2, int iStartIndex, int iEndIndex )
2420
2654
{
2421
2655
// nt2 is optional and should be NoteType_Invalid if it is not used
@@ -2720,6 +2954,9 @@ void NoteDataUtil::TransformNoteData( NoteData &nd, TimingData const& timing_dat
2720
2954
// Jump-adding transforms aren't much affected by additional taps.
2721
2955
if ( po.m_bTransforms [PlayerOptions::TRANSFORM_WIDE] ) NoteDataUtil::Wide ( nd, iStartIndex, iEndIndex );
2722
2956
if ( po.m_bTransforms [PlayerOptions::TRANSFORM_STOMP] ) NoteDataUtil::Stomp ( nd, st, iStartIndex, iEndIndex );
2957
+ if (po.m_bTransforms [PlayerOptions::TRANSFORM_JACKJS]) NoteDataUtil::JackJS (nd, st, timing_data, iStartIndex, iEndIndex);
2958
+ if (po.m_bTransforms [PlayerOptions::TRANSFORM_ANCHORJS]) NoteDataUtil::AnchorJS (nd, st, timing_data, iStartIndex, iEndIndex);
2959
+ if (po.m_bTransforms [PlayerOptions::TRANSFORM_ICYWORLD]) NoteDataUtil::IcyWorld (nd, st, timing_data, iStartIndex, iEndIndex);
2723
2960
2724
2961
// Transforms that add holds go last. If they went first, most tap-adding
2725
2962
// transforms wouldn't do anything because tap-adding transforms skip areas
0 commit comments