Skip to content

Commit

Permalink
read full byte of slx
Browse files Browse the repository at this point in the history
  • Loading branch information
rainlizard committed Oct 26, 2024
1 parent df36de9 commit d68b190
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Scenes/OpenMap.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions Scenes/ReadData.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d68b190

Please sign in to comment.