You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-18 14:21:41 +00:00
Bring that Whole New World to the Old Continent too
Applies the clang-format style to the 2.1 branch as done for master in
5dbf1809c6.
This commit is contained in:
@@ -35,14 +35,13 @@ struct CPNote {
|
||||
|
||||
enum {
|
||||
|
||||
NOTES=120,
|
||||
OFF=254,
|
||||
CUT=253,
|
||||
EMPTY=255,
|
||||
SCRIPT=252,
|
||||
NOTES = 120,
|
||||
OFF = 254,
|
||||
CUT = 253,
|
||||
EMPTY = 255,
|
||||
SCRIPT = 252,
|
||||
};
|
||||
|
||||
|
||||
uint8_t note;
|
||||
uint8_t instrument;
|
||||
uint8_t volume;
|
||||
@@ -53,50 +52,46 @@ struct CPNote {
|
||||
|
||||
void clear() {
|
||||
|
||||
note=EMPTY;
|
||||
instrument=EMPTY;
|
||||
volume=EMPTY;
|
||||
command=EMPTY;
|
||||
parameter=0;
|
||||
script_source_sign='\0';
|
||||
cloned=false;
|
||||
note = EMPTY;
|
||||
instrument = EMPTY;
|
||||
volume = EMPTY;
|
||||
command = EMPTY;
|
||||
parameter = 0;
|
||||
script_source_sign = '\0';
|
||||
cloned = false;
|
||||
}
|
||||
|
||||
|
||||
void raise() {
|
||||
|
||||
if (note<(NOTES-1))
|
||||
note++;
|
||||
else if (note==SCRIPT && parameter<0xFF)
|
||||
parameter++;
|
||||
if (note < (NOTES - 1))
|
||||
note++;
|
||||
else if (note == SCRIPT && parameter < 0xFF)
|
||||
parameter++;
|
||||
}
|
||||
|
||||
void lower() {
|
||||
|
||||
if ((note>0) && (note<NOTES))
|
||||
note--;
|
||||
else if (note==SCRIPT && parameter>0)
|
||||
parameter--;
|
||||
|
||||
if ((note > 0) && (note < NOTES))
|
||||
note--;
|
||||
else if (note == SCRIPT && parameter > 0)
|
||||
parameter--;
|
||||
}
|
||||
|
||||
bool operator== (const CPNote &rvalue) {
|
||||
bool operator==(const CPNote &rvalue) {
|
||||
|
||||
return (
|
||||
(note==rvalue.note) &&
|
||||
(instrument==rvalue.instrument) &&
|
||||
(volume==rvalue.volume) &&
|
||||
(command==rvalue.command) &&
|
||||
(parameter==rvalue.parameter)
|
||||
);
|
||||
(note == rvalue.note) &&
|
||||
(instrument == rvalue.instrument) &&
|
||||
(volume == rvalue.volume) &&
|
||||
(command == rvalue.command) &&
|
||||
(parameter == rvalue.parameter));
|
||||
}
|
||||
|
||||
bool is_empty() const { return (note==EMPTY && instrument==EMPTY && volume==EMPTY && command==EMPTY && parameter==0 && !cloned); }
|
||||
bool is_empty() const { return (note == EMPTY && instrument == EMPTY && volume == EMPTY && command == EMPTY && parameter == 0 && !cloned); }
|
||||
CPNote() {
|
||||
|
||||
clear();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user