From 923b5bc3d6126e5b3b62c27c20a8739519362c6a Mon Sep 17 00:00:00 2001 From: John Alanbrook Date: Thu, 9 Oct 2025 03:32:08 -0500 Subject: [PATCH] tilemap no longer uses ppu --- prosperon/tilemap.cm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/prosperon/tilemap.cm b/prosperon/tilemap.cm index 7c4e973e..daafb4d6 100644 --- a/prosperon/tilemap.cm +++ b/prosperon/tilemap.cm @@ -5,10 +5,11 @@ function tilemap() this.tiles = []; this.offset_x = 0; this.offset_y = 0; - this.ppu = 32 this.layer = 0; // Default layer for scene tree sorting this._geometry_cache = {}; // Cache actual geometry data by texture this._dirty = true; + this.scale_x = 1 + this.scale_y = 1 return this; } @@ -110,17 +111,13 @@ tilemap.prototype = var textureKey = imageToKey.get(tile); if (!textureGroups[textureKey]) { - // compute world-unit size of one tile of this texture - var tile_wu = tile.width / this.ppu; - var tile_hu = tile.height / this.ppu; - textureGroups[textureKey] = { tiles: [], image: tile, // Store the image object offset_x: this.offset_x, offset_y: this.offset_y, - size_x: tile_wu, - size_y: tile_hu + size_x: this.scale_x, + size_y: this.scale_y }; } textureGroups[textureKey].tiles.push({