Giter Club home page Giter Club logo

Comments (3)

AntonYudintsev avatar AntonYudintsev commented on May 29, 2024

Gaijin is not an exception, and we definetly use file packing system. There is even DAS_NO_FILEIO define, which switches off default file access functions (as some game platforms won't allow it anyway)

To make support of any file packing system one can just implement:
class MyFileAccess final : public das::ModuleFileAccess{};
override those two functions (getNewFileInfo and getModuleInfo) and pass smart pointer to that class that to compileDaScript

In addition to that you can override class MyFileInfo final : public das::FileInfo {}, if, for example, you have some kind of memory mapped files and/or custom allocation.

Default implementation is include\daScript\simulate\fs_file_info.h but noone is required to use default.

Allowing send "just string" isn't really an option for more or less sophisiticated project, as most of scripts will require other some other modules anyway.

from dascript.

borisbat avatar borisbat commented on May 29, 2024
    auto access = make_smart<FileAccess>();
    auto fileInfo = make_unique<FileInfo>((char *) str, uint32_t(str_len));
    access->setFileInfo(modName, move(fileInfo));

is the simplest way to introduce string to file access as if it was a file.

from dascript.

AntonYudintsev avatar AntonYudintsev commented on May 29, 2024

https://github.com/GaijinEntertainment/daScript/blob/master/examples/tutorial/tutorial00.cpp

from dascript.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.