com.robrohan.ruin.display
Class Viewport

java.lang.Object
  |
  +--com.robrohan.ruin.display.Viewport

public class Viewport
extends java.lang.Object

MP: A MemoryImageSource graphics viewport. This class needs to be as fast as humanly possible, and thus it might be fairly ugly.


Constructor Summary
Viewport(int xSize, int ySize, byte[][] colorMaps, java.awt.image.ColorModel colorModel)
           
 
Method Summary
 java.awt.Image blankScreen()
           
 void clear(float rot)
           
 void drawImage(ByteImage img, int colorMapIndex, int xOff, int yOff)
           
 void drawMiddleWall(Ssector ssector, ByteImage img, float darkness, int x1, int y11, int y12, float z1, int x2, int y21, int y22, float z2, float xTexOffs, float xTexSize, float yTexOffs, float yTexSize, float xPlayerOffs, float yPlayerOffs, float zPlayerOffs, float rot, int ceilingHeight, int floorHeight)
          This might have to with patches (or imgs on the walls)? uncomment when at that level :)
 void drawOverlay()
           
 void drawScaledImage(Ssector ssector, ByteImage img, float darkness, int xOff, int yOff, float zDist, int xsSize, int ysSize)
           
 void drawWall(Ssector ssector, ByteImage imgu, ByteImage imgl, byte[] ceilingFlat, byte[] floorFlat, float darkness, int x1, int y11, int y12, int y13, int y14, float z1, int x2, int y21, int y22, int y23, int y24, float z2, float xTexOffsU, float xTexSizeU, float yTexOffsU, float yTexSizeU, float xTexOffsL, float xTexSizeL, float yTexOffsL, float yTexSizeL, float xPlayerOffs, float yPlayerOffs, float zPlayerOffs, float rot, int ceilingHeight, int floorHeight)
          Ok, I think these functions draw the textures on to an image based on the information passed from Display.
 java.awt.Image getImg()
           
 ByteImage getNullImage()
           
 void setSkyImage(ByteImage skyImage)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Viewport

public Viewport(int xSize,
                int ySize,
                byte[][] colorMaps,
                java.awt.image.ColorModel colorModel)
Method Detail

blankScreen

public java.awt.Image blankScreen()

getNullImage

public ByteImage getNullImage()

setSkyImage

public void setSkyImage(ByteImage skyImage)

drawImage

public void drawImage(ByteImage img,
                      int colorMapIndex,
                      int xOff,
                      int yOff)

drawScaledImage

public void drawScaledImage(Ssector ssector,
                            ByteImage img,
                            float darkness,
                            int xOff,
                            int yOff,
                            float zDist,
                            int xsSize,
                            int ysSize)

drawWall

public void drawWall(Ssector ssector,
                     ByteImage imgu,
                     ByteImage imgl,
                     byte[] ceilingFlat,
                     byte[] floorFlat,
                     float darkness,
                     int x1,
                     int y11,
                     int y12,
                     int y13,
                     int y14,
                     float z1,
                     int x2,
                     int y21,
                     int y22,
                     int y23,
                     int y24,
                     float z2,
                     float xTexOffsU,
                     float xTexSizeU,
                     float yTexOffsU,
                     float yTexSizeU,
                     float xTexOffsL,
                     float xTexSizeL,
                     float yTexOffsL,
                     float yTexSizeL,
                     float xPlayerOffs,
                     float yPlayerOffs,
                     float zPlayerOffs,
                     float rot,
                     int ceilingHeight,
                     int floorHeight)
Ok, I think these functions draw the textures on to an image based on the information passed from Display.


drawMiddleWall

public void drawMiddleWall(Ssector ssector,
                           ByteImage img,
                           float darkness,
                           int x1,
                           int y11,
                           int y12,
                           float z1,
                           int x2,
                           int y21,
                           int y22,
                           float z2,
                           float xTexOffs,
                           float xTexSize,
                           float yTexOffs,
                           float yTexSize,
                           float xPlayerOffs,
                           float yPlayerOffs,
                           float zPlayerOffs,
                           float rot,
                           int ceilingHeight,
                           int floorHeight)
This might have to with patches (or imgs on the walls)? uncomment when at that level :)


drawOverlay

public void drawOverlay()

clear

public void clear(float rot)

getImg

public java.awt.Image getImg()