Add asset for js

This commit is contained in:
Milan Nikolic 2017-12-10 19:30:42 +01:00
parent 3ea6b47140
commit a0ea8ceabe
6 changed files with 95 additions and 29 deletions

View file

@ -2,7 +2,6 @@ package raylib
import (
"encoding/binary"
"fmt"
"io"
"os"
"unsafe"
@ -27,8 +26,7 @@ func LoadResource(reader io.ReadSeeker, rresID int, key []byte) (data rres.Data)
}
// Verify "rRES" identifier
id := fmt.Sprintf("%c", fileHeader.ID)
if id != "[r R E S]" {
if string(fileHeader.ID[:]) != "rRES" {
TraceLog(LogWarning, "not a valid raylib resource file")
return
}
@ -78,7 +76,7 @@ func LoadResource(reader io.ReadSeeker, rresID int, key []byte) (data rres.Data)
}
if data.Data == nil {
TraceLog(LogInfo, "[ID %d] Requested resource could not be found", rresID)
TraceLog(LogWarning, "[ID %d] Requested resource could not be found", rresID)
}
return