ScummVM API documentation
LA32Ramp.h
1 /* Copyright (C) 2003, 2004, 2005, 2006, 2008, 2009 Dean Beeler, Jerome Fisher
2  * Copyright (C) 2011-2022 Dean Beeler, Jerome Fisher, Sergey V. Mikayev
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 2.1 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef MT32EMU_LA32RAMP_H
19 #define MT32EMU_LA32RAMP_H
20 
21 #include "globals.h"
22 #include "Types.h"
23 
24 namespace MT32Emu {
25 
26 class LA32Ramp {
27 private:
28  Bit32u current;
29  unsigned int largeTarget;
30  unsigned int largeIncrement;
31  bool descending;
32 
33  int interruptCountdown;
34  bool interruptRaised;
35 
36 public:
37  LA32Ramp();
38  void startRamp(Bit8u target, Bit8u increment);
39  Bit32u nextValue();
40  bool checkInterrupt();
41  void reset();
42  bool isBelowCurrent(Bit8u target) const;
43 };
44 
45 } // namespace MT32Emu
46 
47 #endif // #ifndef MT32EMU_LA32RAMP_H
Definition: Analog.h:26
Definition: LA32Ramp.h:26