예제 #1
0
 // Put a pixel on the screen at desired location, with mask consideration
 // If the fourth parameter is not zero-valued, this is the RGBA color
 // without
 // palettized mode. (useful for blue/green guard)
 // NOTE: this method alterates the position in pBackBuffer
 public void pset(int xx, int yy, int colorIndex, Vector4f colorValue) {
   // Check that pixel coordinates is inside screen
   if (xx >= 0 && xx <= width && yy >= 0 && yy <= height) {
     if (colorValue != null) {
       colPset.set(colorValue);
     } else {
       // if (colorIndex!=255)
       // Enable mask display with alpha key = 0
       colPset.set(palette[colorIndex]);
       colPset.w = 255.0f; // color.x; //|=(255 << 24);
     }
     pset(xx, yy, colPset);
   }
 }