Skip to content

Commit

Permalink
Update RagnarokSPR.lua
Browse files Browse the repository at this point in the history
Does not work for the other files...
  • Loading branch information
rdw-software committed Sep 24, 2024
1 parent 6344e7d commit ef797f6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Core/FileFormats/RagnarokSPR.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ end
function RagnarokSPR:DecodeColorPalette()
local reader = self.reader

-- dump(self)
if self.bmpImagesCount == 0 then -- TODO unit test
printf("Ignoring color palette since this sprite has no BMP image segment")
-- Consume incomplete color palette bytes (TBD: Analyze them to see if it might be something else)
self.reader.virtualFilePointer = self.reader.endOfFilePointer
return
end

self.paletteStartOffset = reader.endOfFilePointer - sizeof("spr_palette_t")
self.palette = reader:GetTypedArray("spr_palette_t")
end
Expand Down

0 comments on commit ef797f6

Please sign in to comment.