From 5148fecf59dbbef876ac53c3a877d814da6de0dd Mon Sep 17 00:00:00 2001 From: Richard Knoll Date: Wed, 7 Feb 2024 11:02:59 -0800 Subject: [PATCH] Add support for tilemaps with 4x4 tiles (#1471) --- 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"