import { Lexer } from './parser/Lexer' import { Parser } from './parser/Parser' import { PathResolver } from './utils/PathResolver'; import { MainView } from './view/MainView' import { CharactersES } from './view/gamemodel/CharactersES'; import { MapPlacesES } from './view/gamemodel/MapPlacesES'; let rpyscript = ''; function run(data: string): void { const tokens = new Lexer(data).process().getTokens(); const parser = new Parser(tokens); const view = new MainView(rpyscript === 'userscenario'); view.init(parser, new PathResolver('/resources/es/'), new MapPlacesES(), new CharactersES()); parser.setView(view); parser.next(); } document.addEventListener('DOMContentLoaded', function() { run(` scene cg d6_un_evening_1 with dissolve play music music_list["lets_be_friends"] "Scene 1" scene bg int_house_of_un_day with dissolve "Scene 2" scene bg intro_xx with dspr "Scene 3" `); });