Java Code Examples for com.watabou.gltextures.TextureCache#createSolid()

The following examples show how to use com.watabou.gltextures.TextureCache#createSolid() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CircleArc.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 6 votes vote down vote up
public CircleArc( int triangles, float radius ) {
	
	super( 0, 0, 0, 0 );

	texture = TextureCache.createSolid( 0xFFFFFFFF );
	
	this.nTris = triangles;
	this.rad = radius;
	
	vertices = ByteBuffer.
			allocateDirect( (nTris * 2 + 1) * 4 * (Float.SIZE / 8) ).
			order( ByteOrder.nativeOrder() ).
			asFloatBuffer();
	
	indices = ByteBuffer.
			allocateDirect( nTris * 3 * Short.SIZE / 8 ).
			order( ByteOrder.nativeOrder() ).
			asShortBuffer();
	
	sweep = 1f;
	updateTriangles();
}
 
Example 2
Source File: CircleArc.java    From shattered-pixel-dungeon with GNU General Public License v3.0 6 votes vote down vote up
public CircleArc( int triangles, float radius ) {
	
	super( 0, 0, 0, 0 );

	texture = TextureCache.createSolid( 0xFFFFFFFF );
	
	this.nTris = triangles;
	this.rad = radius;
	
	vertices = ByteBuffer.
			allocateDirect( (nTris * 2 + 1) * 4 * (Float.SIZE / 8) ).
			order( ByteOrder.nativeOrder() ).
			asFloatBuffer();
	
	indices = ByteBuffer.
			allocateDirect( nTris * 3 * Short.SIZE / 8 ).
			order( ByteOrder.nativeOrder() ).
			asShortBuffer();
	
	sweep = 1f;
	updateTriangles();
}
 
Example 3
Source File: CheckedCell.java    From YetAnotherPixelDungeon with GNU General Public License v3.0 5 votes vote down vote up
public CheckedCell( int pos ) {
	super( TextureCache.createSolid( 0xFF55AAFF ) );

	origin.set( 0.5f );
	
	point( DungeonTilemap.tileToWorld( pos ).offset( 
		DungeonTilemap.SIZE / 2, 
		DungeonTilemap.SIZE / 2 ) );
	
	alpha = 0.8f;
}
 
Example 4
Source File: CheckedCell.java    From remixed-dungeon with GNU General Public License v3.0 5 votes vote down vote up
public CheckedCell( int pos ) {
	super( TextureCache.createSolid( 0xFF55AAFF ) );

	origin.set( 0.5f );
	
	point( DungeonTilemap.tileToWorld( pos ).offset( 
		DungeonTilemap.SIZE / 2, 
		DungeonTilemap.SIZE / 2 ) );
	
	alpha = 0.8f;
}
 
Example 5
Source File: HealthIndicator.java    From remixed-dungeon with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void createChildren() {
	bg = new Image( TextureCache.createSolid( 0xFFcc0000 ) );
	bg.Scale().y = HEIGHT;
	add( bg );

	level = new Image( TextureCache.createSolid( 0xFF00cc00 ) );
	level.Scale().y = HEIGHT;
	add( level );
}
 
Example 6
Source File: CheckedCell.java    From shattered-pixel-dungeon with GNU General Public License v3.0 5 votes vote down vote up
public CheckedCell( int pos ) {
	super( TextureCache.createSolid( 0xFF55AAFF ) );

	origin.set( 0.5f );
	
	point( DungeonTilemap.tileToWorld( pos ).offset(
		DungeonTilemap.SIZE / 2,
		DungeonTilemap.SIZE / 2 ) );
	
	alpha = 0.8f;
}
 
Example 7
Source File: BuffIndicator.java    From shattered-pixel-dungeon with GNU General Public License v3.0 5 votes vote down vote up
public BuffIcon( Buff buff ){
	super();
	this.buff = buff;

	icon = new Image( texture );
	icon.frame( film.get( buff.icon() ) );
	add( icon );

	grey = new Image( TextureCache.createSolid(0xCC666666));
	add( grey );
}
 
Example 8
Source File: CheckedCell.java    From pixel-dungeon with GNU General Public License v3.0 5 votes vote down vote up
public CheckedCell( int pos ) {
	super( TextureCache.createSolid( 0xFF55AAFF ) );

	origin.set( 0.5f );
	
	point( DungeonTilemap.tileToWorld( pos ).offset( 
		DungeonTilemap.SIZE / 2, 
		DungeonTilemap.SIZE / 2 ) );
	
	alpha = 0.8f;
}
 
Example 9
Source File: HealthIndicator.java    From pixel-dungeon with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void createChildren() {
	bg = new Image( TextureCache.createSolid( 0xFFcc0000 ) );
	bg.scale.y = HEIGHT;
	add( bg );
	
	level = new Image( TextureCache.createSolid( 0xFF00cc00 ) );
	level.scale.y = HEIGHT;
	add( level );
}
 
Example 10
Source File: CheckedCell.java    From unleashed-pixel-dungeon with GNU General Public License v3.0 5 votes vote down vote up
public CheckedCell( int pos ) {
	super( TextureCache.createSolid( 0xFF55AAFF ) );

	origin.set( 0.5f );
	
	point( DungeonTilemap.tileToWorld( pos ).offset(
		DungeonTilemap.SIZE / 2,
		DungeonTilemap.SIZE / 2 ) );
	
	alpha = 0.8f;
}
 
Example 11
Source File: HealthIndicator.java    From unleashed-pixel-dungeon with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void createChildren() {
	bg = new Image( TextureCache.createSolid( 0xFFcc0000 ) );
	bg.scale.y = HEIGHT;
	add( bg );
	
	level = new Image( TextureCache.createSolid( 0xFF00cc00 ) );
	level.scale.y = HEIGHT;
	add( level );
}
 
Example 12
Source File: PseudoPixel.java    From shattered-pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
public PseudoPixel() {
	super( TextureCache.createSolid( 0xFFFFFFFF ) );
}
 
Example 13
Source File: ColorBlock.java    From shattered-pixel-dungeon with GNU General Public License v3.0 4 votes vote down vote up
public ColorBlock( float width, float height, int color ) {
	super( TextureCache.createSolid( color ) );
	scale.set( width, height );
	origin.set( 0, 0 );
}
 
Example 14
Source File: ColorBlock.java    From YetAnotherPixelDungeon with GNU General Public License v3.0 4 votes vote down vote up
public ColorBlock( float width, float height, int color ) {
	super( TextureCache.createSolid( color ) );
	scale.set( width, height );
	origin.set( 0, 0 );
}
 
Example 15
Source File: ColorBlock.java    From remixed-dungeon with GNU General Public License v3.0 4 votes vote down vote up
public ColorBlock( float width, float height, int color ) {
	super( TextureCache.createSolid( color ) );
	scale.set( width, height );
	origin.set( 0, 0 );
}
 
Example 16
Source File: PseudoPixel.java    From YetAnotherPixelDungeon with GNU General Public License v3.0 4 votes vote down vote up
public PseudoPixel() {
	super( TextureCache.createSolid( 0xFFFFFFFF ) );
}
 
Example 17
Source File: ColorBlock.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 4 votes vote down vote up
public ColorBlock( float width, float height, int color ) {
	super( TextureCache.createSolid( color ) );
	scale.set( width, height );
	origin.set( 0, 0 );
}
 
Example 18
Source File: PseudoPixel.java    From PD-classes with GNU General Public License v3.0 4 votes vote down vote up
public PseudoPixel() {
	super( TextureCache.createSolid( 0xFFFFFFFF ) );
}
 
Example 19
Source File: ColorBlock.java    From PD-classes with GNU General Public License v3.0 4 votes vote down vote up
public ColorBlock( float width, float height, int color ) {
	super( TextureCache.createSolid( color ) );
	scale.set( width, height );
	origin.set( 0, 0 );
}
 
Example 20
Source File: PseudoPixel.java    From shattered-pixel-dungeon-gdx with GNU General Public License v3.0 4 votes vote down vote up
public PseudoPixel() {
	super( TextureCache.createSolid( 0xFFFFFFFF ) );
}