public class CRNGColorCycle extends ColorCycle
This class supports CRNG and CCRT color cycling as published in AMIGA ROM Kernel Reference Manual: Devices, Third Edition, Addison-Wesley, Reading ISBN 0-201-56775-X
//ILBM CRNG Color range cycling
//--------------------------------------------
#define RNG_NORATE 36 // Dpaint uses this rate to mean non-active
set {
active = 1, reverse = 2
} crngActive;
// A CRange is store in a CRNG chunk.
typedef struct {
WORD pad1; // reserved for future use; store 0 here *
WORD rate; // 60/sec=16384, 30/sec=8192, 1/sec=16384/60=273
WORD set crngActive flags; // bit0 set = active, bit 1 set = reverse
UBYTE low; UBYTE high; // lower and upper color registers selected
} ilbmColorRegisterRangeChunk;
ILBM CCRT Color cycling range and timing
--------------------------------------------
/
enum {
dontCycle = 0, forward = 1, backwards = -1
} ccrtDirection;
typedef struct {
WORD enum ccrtDirection direction; /* 0=don't cycle, 1=forward, -1=backwards * /
UBYTE start; /* range lower * /
UBYTE end; /* range upper * /
LONG seconds; /* seconds between cycling * /
LONG microseconds; /* msecs between cycling * /
WORD pad; /* future exp - store 0 here * /
} ilbmColorCyclingAndTimingChunk;
isActive, isBlended, rate, timeScale| Constructor and Description |
|---|
CRNGColorCycle(int rate,
int timeScale,
int low,
int high,
boolean isActive,
boolean isReverse,
boolean isEHB) |
| Modifier and Type | Method and Description |
|---|---|
void |
doBlendedCycle(int[] rgbs,
long time) |
void |
doCycle(int[] rgbs,
long time) |
void |
doHardCycle(int[] rgbs,
long time) |
int |
getHigh() |
int |
getLow() |
boolean |
isReverse() |
clone, getRate, getTimeScale, isActive, isBlended, setBlendedpublic CRNGColorCycle(int rate,
int timeScale,
int low,
int high,
boolean isActive,
boolean isReverse,
boolean isEHB)
public boolean isReverse()
public int getLow()
public int getHigh()
public void doCycle(int[] rgbs,
long time)
doCycle in class ColorCyclepublic void doBlendedCycle(int[] rgbs,
long time)
public void doHardCycle(int[] rgbs,
long time)
Copyright © 2014. All Rights Reserved.