• 0

    posted a message on Photon Cycles source

    In celebration of my birthday, I'm giving the community the Photon Cycles source map. I'm not interested in maintaining it further (or in modding SC2), but it would be a dick-move to let it die when it has regular players, so I decided to make it available to all. I'll apologize in advance for the shitty state of the galaxy script and point out that piling new features on prototype code is a bad idea.

    Posted in: General Chat
  • 0

    posted a message on Duxter - shameless advertising
    Fixed.
    Posted in: Off-Topic
  • 0

    posted a message on Duxter - shameless advertising

    Congrats on scoring an invite!

    Duxter is the online social gaming platform that lets you chat, share, and game with your friends all while earning reward points that can be spent on games, accessories, and cool SWAG. You are pretty special, you are either on the exclusive invite list or one of your hip friends was able to score you this invite. Check out the video and click register!
    Haha. Also, why would they embed js in the html? =\ EDIT: And their styles call assets from gamingsynergies.net, a site with the meta description "Professional Gaming Services provider, 2 years of experience. Intrested in starting a franchise, visit us and be considered for approval." (emphasis added)
    Posted in: Off-Topic
  • 0

    posted a message on [Library] PayPal Button (Easy library to get money out of your map)

    Dialog, edit box, button, trigger. If this sounds non-trivial to you, you're welcome to promote it on your forum.

    Novel ideas do not a resource make, nor even good ideas; good implementations of good ideas, consistent with community values, that save users non-trivial time otherwise spent making their own implementations, that's worth being called a resource.

    Posted in: Trigger Libraries & Scripts
  • 0

    posted a message on [Library] PayPal Button (Easy library to get money out of your map)

    This altogether doesn't seem to warrant being called a resource, and the association with Paypal is superficial. It consists of a single action to create and configure a dialog and its controls, a single trigger to enable visibility of the dialog, and some global variables. Methodological issues aside (initializing the dialog with an action instead of a custom event definition), it's not approved because it's trivial.

    This would make a great example for users new to triggering, because it demonstrates how to trigger a response to a button, how to customize a dialog's appearance, and how to make nice use of an edit box dialog control. It's simply not significant enough to be a resource, though.

    Posted in: Trigger Libraries & Scripts
  • 0

    posted a message on SC2 Arcade Alpha

    Looks fine to me. I don't see much point in complaining about the lack of a feature they didn't claim would be in the patch in the first place.

    Complaining about the duration of development is like that old trope involving children on a trip, repeating "Are we there yet? Are we there yet? Are we there yet?"

    Posted in: General Chat
  • 0

    posted a message on Galaxy++ editor

    Certainly looks like a bug; if there's a good, technical reason why that is the case, it's not obvious.

    At least in the case of structref, its limitations make sense inasfar dynamic memory allocation is not supported, so local struct references would fall out of scope when returned from a function.

    Posted in: Third Party Tools
  • 0

    posted a message on Galaxy++ editor

    Correction: funcref require non-void return functions only when they are defined as arrays.

    void VoidInterface ();
    typedef funcref<VoidInterface> VoidFunc;
    VoidFunc validExample;
    // VoidFunc[2] invalidExample;  throws an error, haha
    
    Posted in: Third Party Tools
  • 0

    posted a message on Galaxy++ editor

    Null reference comparison requires a comparison to a reference var of the same type; null will throw a type error.

    bool TestFuncInterface ();
    typedef funcref<TestFuncInterface> TestFunc;
        
    bool TestRefIsNull (TestFunc func)
    {
        TestFunc nullFunc;
        return (func==nullFunc);
    }
    

    Yeah, Beier, your examples are invalid syntax.

    Also, important to note, is that while function references can be used with complete abandon in global and local scopes, structref can only exist in a function's scope; struct references can be parameters or local variables, but can't be returned, can't be in structs or global vars, so the possibility of genuine constructors are completely out the window.

    EDIT: One more caveat; functions used to define the funcref interface must return a non-void type.

    Posted in: Third Party Tools
  • 0

    posted a message on Galaxy++ editor

    The results of my reference tests.

    int  aFuncInterface(int a);
    int  aFunc(int a)   { return a; }
    int  bFunc(int a)   { return a*2; }
    bool cFunc(int a)   { return true; }
    int  dFunc(fixed a) { return FixedToInt(a*3); }
        
    void RefTest_Func ()
    {
        funcref<aFuncInterface> someFunction = aFunc;
        
        someFunction = bFunc;
      //someFunction = cFunc; type error
      //someFunction = dFunc; type error
        
        someFunction(1);
    }
        
    typedef funcref<aFuncInterface> int_return_intRef;
        
    void RefTest_TypeDefFunc ()
    {
        int_return_intRef someFunction = bFunc;
        
        someFunction = aFunc;
        
        someFunction(1);
    }
        
    void RefTest_FuncArray ()
    {
        int_return_intRef[2] someFunction;
        
        someFunction[0] = aFunc;
        someFunction[1] = bFunc;
        
        someFunction[0](1);
        someFunction[1](1);
    }
        
    int_return_intRef RefTest_FuncReturn ()
    {
        return bFunc;
    }
        
    struct aStruct { int a; string b; };
    aStruct aGlobalStruct;
    struct bStruct { int a; string b; };
    bStruct bGlobalStruct;
        
    void RefTest_Struct ()
    {
        aStruct aLocalStruct;
        structref<aStruct> someStruct = aLocalStruct;
        
        someStruct = aGlobalStruct;
      //someStruct = bGlobalStruct; bulk copy error
    }
        
    typedef structref<aStruct> aStructRef;
        
    void RefTest_TypeDefStruct ()
    {
        aStruct aLocalStruct;
        aStructRef someStruct = aLocalStruct;
        
        someStruct = aGlobalStruct;
    }
        
    void RefTest_StructArray ()
    {
        aStruct aLocalStruct;
        aStructRef[2] someStruct;
        
        someStruct[0] = aLocalStruct;
        someStruct[1] = aGlobalStruct;
    }
        
    struct funcStruct { int_return_intRef method; };
    typedef structref<funcStruct> funcStructRef;
        
    void RefTest_StructMethod ()
    {
        funcStruct aLocalStruct;
        funcStructRef someStruct;
        
        someStruct.method = bFunc;
        
        someStruct.method(1);
    }
        
    void RefTest_Parameters (structref<funcStruct> a, funcref<aFuncInterface> b)
    {
        funcStructRef someStruct = a;
        
        someStruct.method = b;
        
        someStruct.method(1);
    }
        
    void RefTest_ParametersWithTypedef (funcStructRef a, int_return_intRef b)
    {
        RefTest_Parameters(a,b);
    }
    
    Posted in: Third Party Tools
  • 0

    posted a message on SC2 Arcade Alpha

    The results of my reference tests.

    int  aFuncInterface(int a);
    int  aFunc(int a)   { return a; }
    int  bFunc(int a)   { return a*2; }
    bool cFunc(int a)   { return true; }
    int  dFunc(fixed a) { return FixedToInt(a*3); }
        
    void RefTest_Func ()
    {
        funcref<aFuncInterface> someFunction = aFunc;
        
        someFunction = bFunc;
      //someFunction = cFunc; type error
      //someFunction = dFunc; type error
        
        someFunction(1);
    }
        
    typedef funcref<aFuncInterface> int_return_intRef;
        
    void RefTest_TypeDefFunc ()
    {
        int_return_intRef someFunction = bFunc;
        
        someFunction = aFunc;
        
        someFunction(1);
    }
        
    void RefTest_FuncArray ()
    {
        int_return_intRef[2] someFunction;
        
        someFunction[0] = aFunc;
        someFunction[1] = bFunc;
        
        someFunction[0](1);
        someFunction[1](1);
    }
        
    int_return_intRef RefTest_FuncReturn ()
    {
        return bFunc;
    }
        
    struct aStruct { int a; string b; };
    aStruct aGlobalStruct;
    struct bStruct { int a; string b; };
    bStruct bGlobalStruct;
        
    void RefTest_Struct ()
    {
        aStruct aLocalStruct;
        structref<aStruct> someStruct = aLocalStruct;
        
        someStruct = aGlobalStruct;
      //someStruct = bGlobalStruct; bulk copy error
    }
        
    typedef structref<aStruct> aStructRef;
        
    void RefTest_TypeDefStruct ()
    {
        aStruct aLocalStruct;
        aStructRef someStruct = aLocalStruct;
        
        someStruct = aGlobalStruct;
    }
        
    void RefTest_StructArray ()
    {
        aStruct aLocalStruct;
        aStructRef[2] someStruct;
        
        someStruct[0] = aLocalStruct;
        someStruct[1] = aGlobalStruct;
    }
        
    struct funcStruct { int_return_intRef method; };
    typedef structref<funcStruct> funcStructRef;
        
    void RefTest_StructMethod ()
    {
        funcStruct aLocalStruct;
        funcStructRef someStruct;
        
        someStruct.method = bFunc;
        
        someStruct.method(1);
    }
        
    void RefTest_Parameters (structref<funcStruct> a, funcref<aFuncInterface> b)
    {
        funcStructRef someStruct = a;
        
        someStruct.method = b;
        
        someStruct.method(1);
    }
        
    void RefTest_ParametersWithTypedef (funcStructRef a, int_return_intRef b)
    {
        RefTest_Parameters(a,b);
    }
    
    Posted in: General Chat
  • 0

    posted a message on [Texture, Misc] How To Implement Custom Player Decals Without Overriding

    If the subject of this tutorial was not the implementation of custom player decals, that would be a legitimate observation.

    Posted in: Tutorials
  • 0

    posted a message on SC2 Arcade Alpha

    Haha, I never would have guessed that syntax. Thanks.

    Posted in: General Chat
  • 0

    posted a message on SC2 Arcade Alpha
    Quote from Renee2islga: Go

    Last 2 weeks?

    I participated in the patch alpha testing. Now that it's moved into beta (depending on who one asks) with a larger apparent pool of testers, seems safer to discuss it.

    I am skeptical posting galaxy code publicly would be an issue.

    Posted in: General Chat
  • 0

    posted a message on SC2 Arcade Alpha
    Quote from Renee2islga: Go

    And the "function pointer" is in, I find some ways to put functions into structs. And we can pass structs in function parameters

    Please elaborate. I've been trying to figure out the syntax for the last two weeks, with no results.

    Posted in: General Chat
  • To post a comment, please or register a new account.