/**
* Initializes the pattern table textures and pixmap.
*/
public void initialize() {
//Allocate a pixmap big enough to accommodate both pattern tables.
patternTablePixmap = new Pixmap(128, 256, Pixmap.Format.RGBA8888);
//Set blending to none so we can rewrite the pixmap and draw it to the
//pattern table texture when graphics are regenerated.
patternTablePixmap.setBlending(Pixmap.Blending.None);
//Allocate a pixmap the size of one tile for live CHR-RAM updates.
patternPixmap = new Pixmap(8, 8, Pixmap.Format.RGBA8888);
patternPixmap.setBlending(Pixmap.Blending.None);
patternTableTexture = new Texture(patternTablePixmap, false);
TextureRegion[][] textureRegions = TextureRegion.split(patternTableTexture, 8, 8);
patternTableSprites = new Sprite[32][16];
for(int row = 0; row < 32; row++) {
for(int column = 0; column < 16; column++) {
TextureRegion textureRegion = textureRegions[row][column];
patternTableSprites[row][column] = new Sprite(textureRegion);
}
}
initializeMonochromePalette();
}
PatternTableManager.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:ggvm
作者:
评论列表
文章目录