flixel icon indicating copy to clipboard operation
flixel copied to clipboard

loadMapFromGraphic Fails On HTML5

Open luRaichu opened this issue 4 years ago • 1 comments

  • Haxe version: 4.1.5
  • Flixel version: ?.?.?
  • OpenFL version: ?.?.?
  • Lime version: 7.7.0
  • Affected target: HTML5

Code snippet reproducing the issue:

package;

import flixel.FlxState;

class PlayState extends FlxState
{
	override public function create():Void
	{
		super.create();
		var back = new FlxSprite();

		CoolFunctions.playSong('ikachan');
		CoolFunctions.fadeShit();

		bg = new FlxBackdrop("assets/images/Back.png");
		bg.scrollFactor.set(0.75, 0.75);
		add(bg);

		map.loadMapFromGraphic("assets/images/Map1.png", true, 1, [blank, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t], "assets/images/tileset.png", 16, 16, 0, 1, 0);
		map.useScaleHack = false;
		add(map);
	}
}

Observed behavior: Screen Shot 2021-08-10 at 9 37 59 AM

Expected behavior: Screen Shot 2021-08-11 at 9 15 02 AM

luRaichu avatar Aug 11 '21 13:08 luRaichu

That loadMapFromGraphic() code snippet is not very helpful without the assets it needs to be compiled.

Gama11 avatar Aug 12 '21 07:08 Gama11