Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright 2012-04-26 Werner Randelshofer
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.monte.media.ilbm
Class CRNGColorCycle

    java.lang.Object
      org.monte.media.ilbm.ColorCycle
          org.monte.media.ilbm.CRNGColorCycle

All Implemented Interfaces:
  java.lang.Cloneable

    public class CRNGColorCycle

extends ColorCycle

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;

Version:
  1.1 2010-08-03 Added support for blended color cycles.
  1.0.1 2010-11-08 Fixed color cycling rate.
  1.0 2009-12-23 Created.
Author:
  Werner Randelshofer

Field Summary

Fields inherited from class org.monte.media.ilbm.ColorCycle
`isActive, isBlended, rate, timeScale`

Constructor Summary
`CRNGColorCycle(int rate, int timeScale, int low, int high, boolean isActive, boolean isReverse, boolean isEHB)`

Method Summary
`void` | `doBlendedCycle(int[] rgbs, long time)`
`void` | `doCycle(int[] rgbs, long time)`
`void` | `doHardCycle(int[] rgbs, long time)`
`int` | `getHigh()`
`int` | `getLow()`
`boolean` | `isReverse()`

Methods inherited from class org.monte.media.ilbm.ColorCycle
`clone, getRate, getTimeScale, isActive, isBlended, setBlended`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CRNGColorCycle

    public CRNGColorCycle(int rate,
                          int timeScale,
                          int low,
                          int high,
                          boolean isActive,
                          boolean isReverse,
                          boolean isEHB)

Method Detail

### isReverse

    public boolean isReverse()

### getLow

    public int getLow()

### getHigh

    public int getHigh()

### doCycle

    public void doCycle(int[] rgbs,
                        long time)

  Specified by:
    `doCycle` in class `ColorCycle`

### doBlendedCycle

    public void doBlendedCycle(int[] rgbs,
                               long time)

### doHardCycle

    public void doHardCycle(int[] rgbs,
                            long time)

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright 2012-04-26 Werner Randelshofer
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD