mirror of
https://github.com/ddnet/ddnet.git
synced 2024-09-20 09:34:19 +00:00
Add CEnvPoint::MAX_CHANNELS
constant
This commit is contained in:
parent
3c42b224f5
commit
7ce143bd9e
|
@ -4955,21 +4955,21 @@ void CEditor::RenderEnvelopeEditor(CUIRect View)
|
|||
|
||||
ToolBar.VSplitLeft(15.0f, &Button, &ToolBar);
|
||||
|
||||
static const char *s_aapNames[4][4] = {
|
||||
static const char *s_aapNames[4][CEnvPoint::MAX_CHANNELS] = {
|
||||
{"V", "", "", ""},
|
||||
{"", "", "", ""},
|
||||
{"X", "Y", "R", ""},
|
||||
{"R", "G", "B", "A"},
|
||||
};
|
||||
|
||||
static const char *s_aapDescriptions[4][4] = {
|
||||
static const char *s_aapDescriptions[4][CEnvPoint::MAX_CHANNELS] = {
|
||||
{"Volume of the envelope", "", "", ""},
|
||||
{"", "", "", ""},
|
||||
{"X-axis of the envelope", "Y-axis of the envelope", "Rotation of the envelope", ""},
|
||||
{"Red value of the envelope", "Green value of the envelope", "Blue value of the envelope", "Alpha value of the envelope"},
|
||||
};
|
||||
|
||||
static int s_aChannelButtons[4] = {0};
|
||||
static int s_aChannelButtons[CEnvPoint::MAX_CHANNELS] = {0};
|
||||
int Bit = 1;
|
||||
|
||||
for(int i = 0; i < pEnvelope->m_Channels; i++, Bit <<= 1)
|
||||
|
|
|
@ -342,9 +342,14 @@ struct CMapItemVersion
|
|||
|
||||
struct CEnvPoint
|
||||
{
|
||||
enum
|
||||
{
|
||||
MAX_CHANNELS = 4,
|
||||
};
|
||||
|
||||
int m_Time; // in ms
|
||||
int m_Curvetype;
|
||||
int m_aValues[4]; // 1-4 depending on envelope (22.10 fixed point)
|
||||
int m_aValues[MAX_CHANNELS]; // 1-4 depending on envelope (22.10 fixed point)
|
||||
|
||||
bool operator<(const CEnvPoint &Other) const { return m_Time < Other.m_Time; }
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue