From 511837ed4981426958e4a645ecd95ed39c470c49 Mon Sep 17 00:00:00 2001 From: Richard Knoll Date: Wed, 7 Feb 2024 10:49:18 -0800 Subject: [PATCH] Add support for tilemaps with 4x4 tiles --- libs/game/assetTemplates.ts | 4 ++++ libs/game/tilemap.ts | 2 ++ 2 files changed, 6 insertions(+) diff --git a/libs/game/assetTemplates.ts b/libs/game/assetTemplates.ts index 7649a005b..d6eda29f3 100644 --- a/libs/game/assetTemplates.ts +++ b/libs/game/assetTemplates.ts @@ -15,6 +15,10 @@ function tilemap16(lits: any, ...args: any[]): tiles.TileMapData { return null } //% pyConvertToTaggedTemplate function tilemap32(lits: any, ...args: any[]): tiles.TileMapData { return null } +//% helper=getTilemapByName +//% pyConvertToTaggedTemplate +function tilemap4(lits: any, ...args: any[]): tiles.TileMapData { return null } + namespace assets { //% helper=getTilemapByName //% pyConvertToTaggedTemplate diff --git a/libs/game/tilemap.ts b/libs/game/tilemap.ts index 7d5f15e72..babb2a48c 100644 --- a/libs/game/tilemap.ts +++ b/libs/game/tilemap.ts @@ -1,4 +1,6 @@ enum TileScale { + //% block="4x4" + Four = 2, //% block="8x8" Eight = 3, //% block="16x16"