MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / EditVolumeColumn

Method EditVolumeColumn

Source/FamiTrackerView.cpp:2432–2466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2430}
2431
2432bool CFamiTrackerView::EditVolumeColumn(stChanNote &Note, int Key, bool &bStepDown)
2433{
2434 edit_style_t EditStyle = FTEnv.GetSettings()->General.iEditStyle;
2435
2436 if (!m_bEditEnable)
2437 return false;
2438
2439 if (CheckClearKey(Key)) {
2440 Note.Vol = MAX_VOLUME;
2441 if (EditStyle != edit_style_t::MPT)
2442 bStepDown = true;
2443 m_LastNote.Vol = MAX_VOLUME;
2444 return true;
2445 }
2446 else if (CheckRepeatKey(Key)) {
2447 Note.Vol = m_LastNote.Vol;
2448 if (EditStyle != edit_style_t::MPT)
2449 bStepDown = true;
2450 return true;
2451 }
2452
2453 int Value = ConvertKeyToHex(Key);
2454
2455 if (Value == -1 && FTEnv.GetSettings()->General.bHexKeypad) // // //
2456 Value = ConvertKeyExtra(Key);
2457 if (Value == -1)
2458 return false;
2459
2460 m_LastNote.Vol = Note.Vol = Value; // // //
2461
2462 if (EditStyle != edit_style_t::MPT)
2463 bStepDown = true;
2464
2465 return true;
2466}
2467
2468bool CFamiTrackerView::EditEffNumberColumn(stChanNote &Note, unsigned char nChar, int EffectIndex, bool &bStepDown)
2469{

Callers

nothing calls this directly

Calls 3

ConvertKeyToHexFunction · 0.85
ConvertKeyExtraFunction · 0.85
GetSettingsMethod · 0.45

Tested by

no test coverage detected