<The Legend of Sword and Fairy> porting to HTML5. Based on sdlpal