Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into main
  • Loading branch information
K4thos committed Nov 3, 2021
2 parents 3e4d5b4 + e86ee09 commit 951d075
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 0 additions & 4 deletions build/build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ cd ..
set CGO_ENABLED = 1
set GOOS = windows

echo Using Zig for compilation.
set CC = zig cc
set CCX = zig c++

if not exist go.mod (
echo Missing dependencies, please run get.cmd
echo.
Expand Down
4 changes: 2 additions & 2 deletions src/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -961,7 +961,7 @@ func (s *Sprite) readV2(f *os.File, offset int64, datasize uint32) error {
px = pi.Pix
}
case 11, 12:
var ok bool
var ok bool = false
isPng = true

// Decode PNG image to RGBA
Expand All @@ -984,7 +984,7 @@ func (s *Sprite) readV2(f *os.File, offset int64, datasize uint32) error {
if !isPng {
s.SetPxl(px)
} else {
s.SetPng(rgba, int32(rect.Max.X-rect.Min.X), int32(rect.Max.Y-rect.Min.Y),)
s.SetPng(rgba, int32(rect.Max.X-rect.Min.X), int32(rect.Max.Y-rect.Min.Y))
}
}
return nil
Expand Down
1 change: 1 addition & 0 deletions src/script.go
Original file line number Diff line number Diff line change
Expand Up @@ -1694,6 +1694,7 @@ func systemScriptInit(l *lua.LState) {
if err != nil {
l.RaiseError(err.Error())
}
sys.runMainThreadTask()
l.Push(newUserData(l, sff))
return 1
})
Expand Down

0 comments on commit 951d075

Please sign in to comment.