seyhajin

Forum Replies Created

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts

  • seyhajin
    Participant

    The “With … End” statement is considered as a “helper” to have a clearer and less verbose source code, neither more nor less, it does not modify the control structures. A bit like the use of “Alias” which allows to “simplify” a type of variable or function. For example, you can write “Rect <Float>” to “Rectf” in your “Rect <Float>” and with “Alias”, and nothing prevents you from writing “Rect <Float>” elsewhere of your application. There are two different ways to use it but quite compatible.

    1. You define an “ObjectClass” with “With” keyword as the current “Object” to use in the block
    2. Inside the “With” block, you use (dot) “.MyMethod or .MyProperty” directly without rewriting your declared “With”
    3. “End”
    in reply to: [REQUEST] Add 'With…End With' Statement in Monkey2 language #9905

    seyhajin
    Participant

    The right subject is to request to integrate “With” statement in Monkey2 language, no how to use an equivalent. 🙂

    Do you think this is possible to add this in Monkey2 simply?


    seyhajin
    Participant

    Obviously this has a real interest if there are many members called for the same object, or calling the members of these nested objects. In use it will always be much less verbose.


    seyhajin
    Participant

    “With statement” work with ObjectClass expression only (class if you want use static function/variable or instance of class) and use “.” (dot) or “->”, if object’s pointer, in the block to avoid rewrite ObjectClass.

    Syntax :

    [ObjectExpression] : Required. An expression that evaluates to an object or class/struct
    [Statements] : Optional. One or more statements between ‘With’ and ‘End’ that may refer to members of an objects that’s produced by the evaluation of [ObjectExpression]
    [End] : Required. Terminates the definition of the “With” block

    Monkey2 example :

    in reply to: Windows SendInput function #8121

    seyhajin
    Participant

    Directly with SDL function : SDL_WarpMouseGlobal:Void( x:Int, y:Int )
    Remarks : This function generates a mouse motion event. A failure of this function usually means that it is unsupported by a platform.

    in reply to: gles3.0 vs gles2.0 for mx23d #7098

    seyhajin
    Participant

    Do you look at the side of bgfx – Cross platform rendering library ? I think it would solve the rendering backend problems for all target platforms.

    To quote the github page:

    What is it?
    Cross-platform, graphics API agnostic, “Bring Your Own Engine/Framework” style rendering library.
    Supported rendering backends:

    • Direct3D 9
    • Direct3D 11
    • Direct3D 12 (WIP)
    • Metal (WIP)
    • OpenGL 2.1
    • OpenGL 3.1+
    • OpenGL ES 2
    • OpenGL ES 3.1
    • WebGL 1.0
    • WebGL 2.0

    Supported HMD:

    • OculusVR (1.3.0)

    Supported platforms:

    • Android (14+, ARM, x86, MIPS)
    • asm.js/Emscripten (1.25.0)
    • FreeBSD
    • iOS (iPhone, iPad, AppleTV)
    • Linux
    • MIPS Creator CI20
    • Native Client (PPAPI 37+, ARM, x86, x64, PNaCl)
    • OSX (10.9+)
    • RaspberryPi
    • SteamLink
    • Windows (XP, Vista, 7, 8, 10)
    • WinRT (WinPhone 8.0+)

    Supported compilers:

    • Clang 3.3 and above
    • GCC 4.6 and above
    • VS2012 and above

    API Reference

    Look some screenshots of samples.

    in reply to: Ted2Go IDE #6273

    seyhajin
    Participant

    Improve – types parsing (:=True, ‘Ptr’ and some other)

    Thanks it’s work perfectly 🙂

    in reply to: Ted2Go IDE #5926

    seyhajin
    Participant

    Wow! it’s really nice feature. Congrats!

    I just find an little bug on AutoCompletion, if an parameters of function contains “xxx Ptr”, that’s don’t parse correctly. (eg: screenshots for example).

    in reply to: Shortening file extension *.monkey2 to *.mx2 or other #5863

    seyhajin
    Participant

    Ok Mark, it’s just a simple suggestion. Maybe for next Monkey… 😉

    in reply to: Possible to add method to Rect with "Extension" ? #5197

    seyhajin
    Participant

    Hi,

    I need to extend Vec2<T> struct with additionnal features but i have an errors with ‘Property’. Can you tell me if my code is correct and why he doesn’t work?

Viewing 10 posts - 1 through 10 (of 10 total)