resonance 1.0.1
Loading...
Searching...
No Matches
playmaprepeatring.h
Go to the documentation of this file.
1#pragma once
2
3#include <vector>
4
5#include "game/playmap.h"
6
22class PlayMapRepeatRing : public PlayMap {
23public:
34
40
55 virtual void SetBarCount(int nBarCount);
56
67 virtual void ResetSpans();
68
81 virtual int MapBar(int nBar);
82
97 virtual std::vector<int> &FindBarsPlaying(int nStart, int nMin, int nEnd);
98
111 virtual void CloseSpan(int nRepeats);
112
122 virtual int EndLoop(int nBar);
123
134 virtual int StartLoop(int nBar);
135
144 virtual int ToggleLoop(int nBar);
145
155 virtual void AddUnlabeledStep(int nPosition);
156
157protected:
169 int SpanIndex(int nBar);
170
171 // Span starts in ascending order, terminated by the literal 10000000. ResetSpans() resets it
172 // to 0 and that terminator, SetBarCount() pads it with -1, and CloseSpan() closes its last
173 // span. The element type is int from the four-byte stride of every access.
174 std::vector<int> mSpanStarts; // +0x3c
175};
virtual void CloseSpan(int nRepeats)
Closes the last span and opens a new one.
virtual ~PlayMapRepeatRing()
virtual int MapBar(int nBar)
Maps the bar into one turn of the repeating ring.
virtual int StartLoop(int nBar)
Reopen the span a bar falls in by making it the last one.
virtual void ResetSpans()
Resets mSpanStarts to a single empty span.
PlayMapRepeatRing()
Construct a map whose run holds one span from zero to the terminator.
virtual int EndLoop(int nBar)
Close the open span a bar falls in after the number of passes that reaches the bar.
virtual std::vector< int > & FindBarsPlaying(int nStart, int nMin, int nEnd)
Collects every position between two bounds that plays the same step offset as a position.
virtual void AddUnlabeledStep(int nPosition)
Append a step with an empty label, through PlayMap::AddStep() called directly.
virtual int ToggleLoop(int nBar)
Toggle the span a bar falls in between open and closed.
std::vector< int > mSpanStarts
Definition playmaprepeatring.h:174
int SpanIndex(int nBar)
Report the index of the span a bar falls in.
virtual void SetBarCount(int nBarCount)
Stores the bar count, resets the spans, and pads the span run to match.
PlayMap()
Construct an empty map whose first step is at zero.