legacy
Class Accelerators

java.lang.Object
  extended by legacy.Accelerators

public class Accelerators
extends java.lang.Object

Accelerators.class conatins various methods for generation accelerated method, funcion and class code

Author:
Benjamin Tarrant

Constructor Summary
Accelerators()
           
 
Method Summary
static java.lang.String optimizeScanlineShift(int scanline, java.lang.String param)
          optimizeScanlineShift converts a simple expresion such as pix[x+(y*width] = color to and equivical code segment using shift operators instread of multiplication.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Accelerators

public Accelerators()
Method Detail

optimizeScanlineShift

public static final java.lang.String optimizeScanlineShift(int scanline,
                                                           java.lang.String param)
optimizeScanlineShift converts a simple expresion such as pix[x+(y*width] = color to and equivical code segment using shift operators instread of multiplication.
example
 y*320 equates to ((y<<8)+(y<<6))
 

Parameters:
scanline - width of a scanline or graphical object
param - paramiter to be shifted
Returns:
the augmented code.