java.lang.Object
org.monte.media.ilbm.ColorCycle
org.monte.media.ilbm.CRNGColorCycle
- All Implemented Interfaces:
Cloneable
Implements CRNG and CCRT color cycling for an IFF ILBM image.
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;
- Author:
- Werner Randelshofer
-
Field Summary
Fields inherited from class org.monte.media.ilbm.ColorCycle
isActive, isBlended, rate, timeScale -
Constructor Summary
ConstructorsConstructorDescriptionCRNGColorCycle(int rate, int timeScale, int low, int high, boolean isActive, boolean isReverse, boolean isEHB) -
Method Summary
Modifier and TypeMethodDescriptionvoiddoBlendedCycle(int[] rgbs, long time) voiddoCycle(int[] rgbs, long time) voiddoHardCycle(int[] rgbs, long time) intgetHigh()intgetLow()booleanMethods inherited from class org.monte.media.ilbm.ColorCycle
clone, getRate, getTimeScale, isActive, isBlended, setBlended
-
Constructor Details
-
CRNGColorCycle
public CRNGColorCycle(int rate, int timeScale, int low, int high, boolean isActive, boolean isReverse, boolean isEHB)
-
-
Method Details
-
isReverse
public boolean isReverse() -
getLow
public int getLow() -
getHigh
public int getHigh() -
doCycle
public void doCycle(int[] rgbs, long time) - Specified by:
doCyclein classColorCycle
-
doBlendedCycle
public void doBlendedCycle(int[] rgbs, long time) -
doHardCycle
public void doHardCycle(int[] rgbs, long time)
-