GithubHelp home page GithubHelp logo

Tracking issue for DSLs about papermario HOT 3 CLOSED

bates64 avatar bates64 commented on August 22, 2024
Tracking issue for DSLs

from papermario.

Comments (3)

bates64 avatar bates64 commented on August 22, 2024 1

Considering getting rid of cc_dsl in favour of simple macros since this repo will be used for learning about the game's internals and the fancy DSL can make it harder to understand

EvtSource script = {
    evt_ifgt(SI_VAR(0), 0),
        evt_call(SetPlayerPos, 0, SI_VAR(0), 0),
    evt_endif,
    evt_return,
    evt_end,
};

from papermario.

bates64 avatar bates64 commented on August 22, 2024

Now we've renamed ScriptInstance to Evt it may be worth renaming all the si funcs to evt (and even matching the TTYD opcode names).

from papermario.

bates64 avatar bates64 commented on August 22, 2024

Greenlit script macros:

ApiStatus api_GetPlayerPos(Evt* script, ...)

// Macros are used to make EVT_USER_FUNCs easier to use, and to document the number of args they take

// outX: x position of player
#define GetPlayerPos(outX, outY, outZ) EVT_USER_FUNC(api_GetPlayerPos, outX, outY, outZ)

EvtSource myScript = {
    GetPlayerPos(EVT_VAR(0), EVT_VAR(1), EVT_VAR(2))
    EVT_IF_GT(EVT_VAR(1), 100)
        SetPlayerPos(EVT_VAR(1))
    EVT_END_IF
    EVT_RETURN
    EVT_END
};

from papermario.

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.