From d68b1906d9b62b03d013d2e783258d81beab8e6e Mon Sep 17 00:00:00 2001 From: rainlizard <15337628+rainlizard@users.noreply.github.com> Date: Sat, 26 Oct 2024 22:09:25 +1100 Subject: [PATCH] read full byte of slx --- Scenes/OpenMap.gd | 2 +- Scenes/ReadData.gd | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Scenes/OpenMap.gd b/Scenes/OpenMap.gd index 6aaa6ee6..d1b4a182 100644 --- a/Scenes/OpenMap.gd +++ b/Scenes/OpenMap.gd @@ -70,7 +70,7 @@ func start(): #for i in 200: # yield(get_tree(), "idle_frame") #oCurrentMap.clear_map() - open_map("D:/Dungeon Keeper/levels/personal/map00002.slb") + open_map("C:/Games/Dungeon Keeper/levels/personal/map00002.slb") #open_map("D:/Dungeon Keeper/campgns/dpthshdw/map00014.slb") else: # initialize a cleared map diff --git a/Scenes/ReadData.gd b/Scenes/ReadData.gd index 8050badc..83ad0053 100644 --- a/Scenes/ReadData.gd +++ b/Scenes/ReadData.gd @@ -102,9 +102,8 @@ func read_slx(buffer): for ySlab in M.ySize: for xSlab in M.xSize: value = buffer.get_u8() - var lower4bits = value & 0x0F # Red value will be used to store the slx value - oDataSlx.slxImgData.set_pixel(xSlab, ySlab, Color8(lower4bits,0,0,255)) + oDataSlx.slxImgData.set_pixel(xSlab, ySlab, Color8(value,0,0,255)) oDataSlx.slxImgData.unlock() oDataSlx.slxTexData.create_from_image(oDataSlx.slxImgData, 0)