deepnight/gameBase

Error loading assets running advancedBase on JS

mendieta opened this issue · 1 comments

I have cloned the advancedBase branch, after trying to run it on js target it throws the following error:

FontParser.hx:47 Uncaught TypeError: Cannot read properties of undefined (reading 'getInt32')
    at Function.hxd_fmt_bfnt_FontParser.parse (FontParser.hx:47)
    at hxd_res_BitmapFont.toFont (BitmapFont.hx:26)
    at Function.assets_Assets.init (Assets.hx:32)
    at App.initAssets (App.hx:173)
    at new App (App.hx:26)
    at Boot.init (Boot.hx:16)
    at App.hx:142
    at Boot.loadAssets (App.hx:170)
    at Boot.setup (App.hx:140)
    at h3d_Engine.onCreate (Engine.hx:256)

The error occurs while trying to load any file using the Embed File system of heaps, this doesn't happen with the stable version of heaps. While using the one from your git, defined in setup.hxml, this happens. Or at least I think that's the issue, same thing happens with all the assets if I change the order in src/game/assets/Assets.hx

haxe version: 4.2.3

OS: OSX 11.4

haxelib list

ase: [2.0.0]
castle: 1.6.1 [git]
colyseus-websocket: [1.0.7]
colyseus: [0.14.9]
deepnightLibs: 1.0.64 [git]
domkit: [0.2.0] git
format: [3.5.0]
heaps-aseprite: [git]
heaps: 1.9.1 [git]
hldx: [1.10.0]
hlopenal: [1.5.0]
hlsdl: [1.10.0]
hscript: [git]
hx3compat: [git]
hxbit: [git]
hxcpp-debug-server: [dev:/Users/user/.vscode/extensions/vshaxe.hxcpp-debugger-1.2.4/hxcpp-debug-server]
hxnodejs: [git]
ldtk-haxe-api: [git]
redistHelper: [0.5.1]

I see, it seems related to a recent Heaps bug: HeapsIO/heaps#1023

I'll update my Heaps repo to latest. Thanks for reporting :)