Skip to content

Commit

Permalink
revert
Browse files Browse the repository at this point in the history
revert

revert
  • Loading branch information
rdw-software committed Feb 3, 2024
1 parent d237420 commit 038e73a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions Tests/Tools/RagnarokTools.spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ describe("RagnarokTools", function()

local generatedFileContents = C_FileSystem.ReadFile("gat-height-map.png")
local generatedImageBytes, width, height = C_ImageProcessing.DecodeFileContents(generatedFileContents)
error(dump(buffer.new():put(generatedImageBytes)))
local generatedChecksum = openssl.digest.digest("sha256", generatedImageBytes)

assertEquals(width, 3)
Expand Down
4 changes: 2 additions & 2 deletions Tools/RagnarokTools.lua
Original file line number Diff line number Diff line change
Expand Up @@ -333,8 +333,8 @@ function RagnarokTools:ExportTerrainMapFromGAT(gatFileContents, outputDirectory)
local pixelColor = terrainTypeColors[terrainTypeID]

assert(pixelColor, format("Missing pixel color for terrain type %s", terrainTypeID))

rgbaImageBytes:putcdata(ffi.new("uint8_t[1]", pixelColor.red), 1)
print("WTF", tileID, terrainTypeID, dump(pixelColor))
rgbaImageBytes:putcdata(ffi.new("uint8_t[1]", pixelColor.red * 255), 1)
rgbaImageBytes:putcdata(ffi.new("uint8_t[1]", pixelColor.green * 255), 1)
rgbaImageBytes:putcdata(ffi.new("uint8_t[1]", pixelColor.blue * 255), 1)
rgbaImageBytes:putcdata(ffi.new("uint8_t[1]", 255), 1)
Expand Down

0 comments on commit 038e73a

Please sign in to comment.