Example #1
0
void do_file(IoVM& vm, string file_name)
{
    std::string scriptPath(file_name);
    boost::algorithm::trim_right_if(scriptPath, IsNotDirChar());
    vm.set_script_path(scriptPath);
    std::stringstream code;
    code << "doFile(\"" << file_name << "\")";
    vm.do_string(code.str());
}
Example #2
0
void do_cli(IoVM& vm)
{
    cout << std::endl;
    cout << "LikeMagic Io binding library." << std::endl;
    cout << "To run file from system commandline: LikeMagic <filename.io>" << std::endl;
    cout << "To run file from the Io> prompt: doFile(\"<filename.io>\")" << std::endl;
    cout << "" << std::endl;
    cout << "Type 'exit' to quit." << std::endl;
    vm.run_cli();
}
Example #3
0
void do_file(IoVM& vm, string file_name)
{
    std::string scriptPath(file_name);
    boost::algorithm::trim_right_if(scriptPath, IsNotDirChar());
    //vm.add_proto("scriptPath", scriptPath, NamespacePath::global(), true);
    ScriptUtil::set_script_path(scriptPath);
    std::stringstream code;
    code << "doFile(\"" << file_name << "\")";
    vm.do_string(code.str());
}
Example #4
0
void add_protos(IoVM& vm)
{
    LM_ENUM_PROTOS(vm, (ESM_AUTO_DETECT)(ESM_STREAMING)(ESM_NO_STREAMING)(ESM_FORCE_32_BIT))

    LM_ENUM_PROTOS(vm, (ESOD_AUTO_DETECT)(ESOD_DIRECT_SOUND_8)(ESOD_DIRECT_SOUND)
        (ESOD_WIN_MM)(ESOD_ALSA)(ESOD_CORE_AUDIO)(ESOD_NULL)(ESOD_COUNT)(ESOD_FORCE_32_BIT)
    )

    LM_ENUM_PROTOS(vm, (ESEO_DEFAULT_OPTIONS)(ESEO_MULTI_THREADED)(ESEO_MUTE_IF_NOT_FOCUSED)(ESEO_LOAD_PLUGINS)
        (ESEO_USE_3D_BUFFERS)(ESEO_PRINT_DEBUG_INFO_TO_DEBUGGER)(ESEO_PRINT_DEBUG_INFO_TO_STDOUT)(ESEO_LINEAR_ROLLOFF)
    )

    vm.add_proto("IRR_KLANG_VERSION", IRR_KLANG_VERSION, true);
}