Death Star graphic set added

This commit is contained in:
Mal 2023-09-23 20:39:10 +02:00
parent 014152b011
commit 6f548a1b47
3 changed files with 20 additions and 6 deletions

View File

@ -5,7 +5,8 @@ let GraphicSet = [
tiles: 8, tiles: 8,
scale: 3, scale: 3,
backgroundColor: '#6096ff', backgroundColor: '#6096ff',
backgroundImage: null backgroundImage: null,
tilePreview: 5
}, },
{ {
name: 'Moon', name: 'Moon',
@ -13,7 +14,17 @@ let GraphicSet = [
tiles: 2, tiles: 2,
scale: 3, scale: 3,
backgroundColor: 'black', backgroundColor: 'black',
backgroundImage: 'background_earth.jpg' backgroundImage: 'background_earth.jpg',
tilePreview: 1
},
{
name: 'Death Star',
tileset: 'deathstar.png',
tiles: 96,
scale: 1,
backgroundColor: '#171721',
backgroundImage: null,
tilePreview: 1
} }
]; ];

View File

@ -224,12 +224,12 @@ export default class RetroArchitecture
{ {
context.drawImage( context.drawImage(
this.tilesetSprite.canvas, this.tilesetSprite.canvas,
field.tile.index * this.tileWidth, (field.tile.index % this.tiles) * this.tileWidth,
0, 0,
this.tileWidth, this.tileWidth,
this.tileHeight, this.tileHeight,
x * this.tileWidth - camera.position.x, x * this.tileWidth - camera.position.x - 1,
y * this.tileHeight - camera.position.y, y * this.tileHeight - camera.position.y - 1,
this.tileWidth + 1, this.tileWidth + 1,
this.tileHeight + 1 this.tileHeight + 1
); );

View File

@ -112,6 +112,9 @@ body {
top: 0; top: 0;
background-color: #cccccc; background-color: #cccccc;
box-shadow: 20px 20px 20px rgba(0, 0, 0, 0.5); box-shadow: 20px 20px 20px rgba(0, 0, 0, 0.5);
max-width: 1000%;
max-height: 500%;
overflow: auto;
} }
#tileset-picker:hover > #tileset-selector-widget { #tileset-picker:hover > #tileset-selector-widget {