Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
rainlizard committed Mar 19, 2024
1 parent f9297e2 commit a19530a
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions Scenes/ReadData.gd
Original file line number Diff line number Diff line change
Expand Up @@ -180,14 +180,12 @@ func new_slb():

func read_own(buffer):
buffer.seek(0)
var dataWidth = (M.xSize * 3) + 1
var totalSubtiles = ((M.ySize * 3) + 1) * dataWidth
var data = buffer.get_data(totalSubtiles)
for i in totalSubtiles:
var ySubtile = i / dataWidth
var xSubtile = i % dataWidth
var value = data[i]
oDataOwnership.set_cell(xSubtile / 3, ySubtile / 3, value)
var dataHeight = (M.ySize*3)+1
var dataWidth = (M.xSize*3)+1
for ySubtile in dataHeight:
for xSubtile in dataWidth:
value = buffer.get_u8()
oDataOwnership.set_cell(xSubtile/3,ySubtile/3,value)
func new_own():
pass

Expand Down

0 comments on commit a19530a

Please sign in to comment.