Skip to content

Commit

Permalink
[Ref] Backport ModCommand::SetVolumeCommand and ModCommand::SetEffect…
Browse files Browse the repository at this point in the history
…Command.

git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.30@20861 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
sagamusix committed May 26, 2024
1 parent 375a456 commit 68d68dc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions soundlib/modcommand.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,13 @@ class ModCommand
}
bool operator!=(const ModCommand& mc) const { return !(*this == mc); }

MPT_FORCEINLINE void SetVolumeCommand(const VolumeCommand c, const VOL v) { volcmd = c; vol = v; }
MPT_FORCEINLINE void SetVolumeCommand(const std::pair<VolumeCommand, VOL> cmd) { volcmd = cmd.first; vol = cmd.second; }
MPT_FORCEINLINE void SetVolumeCommand(const ModCommand &other) { volcmd = other.volcmd; vol = other. vol; }
MPT_FORCEINLINE void SetEffectCommand(const EffectCommand c, const PARAM p) { command = c; param = p; }
MPT_FORCEINLINE void SetEffectCommand(const std::pair<EffectCommand, PARAM> cmd) { command = cmd.first; param = cmd.second; }
MPT_FORCEINLINE void SetEffectCommand(const ModCommand &other) { command = other.command; param = other.param; }

void Set(NOTE n, INSTR ins, uint16 volcol, uint16 effectcol) { note = n; instr = ins; SetValueVolCol(volcol); SetValueEffectCol(effectcol); }

uint16 GetValueVolCol() const { return GetValueVolCol(volcmd, vol); }
Expand Down

0 comments on commit 68d68dc

Please sign in to comment.