summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2018-10-31 12:54:49 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2018-10-31 12:54:49 +0100
commit272e37a4084526688cb4408d9e2b959f57c0d2c7 (patch)
tree3061917a63f45b43cac64418580fc5b7847d8642
parent6370b601896983823f2813e817e9291b03bea76f (diff)
downloadrpgedit-272e37a4084526688cb4408d9e2b959f57c0d2c7.tar
rpgedit-272e37a4084526688cb4408d9e2b959f57c0d2c7.zip
view: move tile size definition to MapLoader
We also remove the unneeded redrawPending flag.
-rw-r--r--src/view/MapLoader.ts2
-rw-r--r--src/view/MapView.ts4
2 files changed, 1 insertions, 5 deletions
diff --git a/src/view/MapLoader.ts b/src/view/MapLoader.ts
index 6953321..878fef4 100644
--- a/src/view/MapLoader.ts
+++ b/src/view/MapLoader.ts
@@ -45,7 +45,7 @@ function mkTileMap(
gl: WebGLRenderingContext,
tiles: Map<string, HTMLImageElement>,
): TileMap {
- const tileSize = MapView.tileSize;
+ const tileSize = 32;
const canvasDim = nextPowerOf2(Math.sqrt(tiles.size));
const canvasSize = canvasDim * tileSize;
diff --git a/src/view/MapView.ts b/src/view/MapView.ts
index f6736e2..1061196 100644
--- a/src/view/MapView.ts
+++ b/src/view/MapView.ts
@@ -3,10 +3,6 @@ import {TileMap} from './MapLoader';
import Renderer from './renderer/Renderer';
export default class MapView {
- public static readonly tileSize: number = 32;
-
- private redrawPending: boolean = false;
-
private readonly vertexBuffer: WebGLBuffer;
private readonly textureBuffer: WebGLBuffer;