Value that moves linearly to a target over song ticks, applied in steps by a scheduled command.
More...
#include <ramp.h>
|
| | Ramp (Scheduler *pScheduler, float fValue) |
| | Construct a ramp that holds a value.
|
| virtual | ~Ramp () |
| | Stop the ramp.
|
| virtual void | Apply (float fValue, int nTick)=0 |
| | Apply a new value.
|
| void | MoveTo (int nTicks, int nStepTicks, float fTarget) |
| | Move from the current value to a target.
|
| void | Move (int nTicks, int nStepTicks, float fFrom, float fTarget) |
| | Move from one value to another.
|
| void | Stop () |
| | Withdraw the next step, leaving the value where it is.
|
| float | GetValue () const |
| | Report the current value.
|
Value that moves linearly to a target over song ticks, applied in steps by a scheduled command.
The RTTI includes the class name. A derived class supplies Apply(), which receives each new value. Only the members its callers here use are declared.
◆ Ramp()
| Ramp::Ramp |
( |
Scheduler * | pScheduler, |
|
|
float | fValue ) |
Construct a ramp that holds a value.
- Parameters
-
| pScheduler | The scheduler the steps are queued on. |
| fValue | The starting value. |
- Ghidra address:
- NTSC-U/C: 0x002817f8
- Ghidra address:
- PAL: 0x0028b0f8
◆ ~Ramp()
Stop the ramp.
- Ghidra address:
- NTSC-U/C: 0x00281880
- Ghidra address:
- PAL: 0x0028b180
◆ Apply()
| virtual void Ramp::Apply |
( |
float | fValue, |
|
|
int | nTick ) |
|
pure virtual |
◆ MoveTo()
| void Ramp::MoveTo |
( |
int | nTicks, |
|
|
int | nStepTicks, |
|
|
float | fTarget ) |
Move from the current value to a target.
- Parameters
-
| nTicks | The ticks the move lasts. Zero applies the target at once. |
| nStepTicks | The ticks between steps. |
| fTarget | The target. |
- Ghidra address:
- NTSC-U/C: 0x002818e8
- Ghidra address:
- PAL: 0x0028b1e8
◆ Move()
| void Ramp::Move |
( |
int | nTicks, |
|
|
int | nStepTicks, |
|
|
float | fFrom, |
|
|
float | fTarget ) |
Move from one value to another.
A move of no ticks, or between equal values, applies the target at once.
- Parameters
-
| nTicks | The ticks the move lasts. |
| nStepTicks | The ticks between steps. |
| fFrom | The starting value. |
| fTarget | The target. |
- Ghidra address:
- NTSC-U/C: 0x00281910
- Ghidra address:
- PAL: 0x0028b210
◆ Stop()
Withdraw the next step, leaving the value where it is.
- Ghidra address:
- NTSC-U/C: 0x002819f0
- Ghidra address:
- PAL: 0x0028b2f0
◆ GetValue()
| float Ramp::GetValue |
( |
| ) |
const |
Report the current value.
- Returns
- The value.
- Ghidra address:
- NTSC-U/C: 0x00281a28
- Ghidra address:
- PAL: 0x0028b328
The documentation for this class was generated from the following file: