• 0

    posted a message on Galaxy++ editor

    Yeah, I know that the coloring function is a bit messed up.. I got a redesign for it planned. It shouldn't be a problem for the actual compiler though.

    Posted in: Third Party Tools
  • 0

    posted a message on Galaxy++ editor
    Quote from Kueken531: Go

    400 lines in one file is really slow already. Not sure, if there should be any convention to not create that huge files, but 400 lines is not that much imo... (just 1 dialog with some options)

    I'll try to look into it.. It's a little difficult, since I don't really notice it on my system, but there is probably more optimizations I can do. Does the slowdown happen at specific input, or is it on each keystroke? Is it perhaps only when the suggestion box is shown?

    Quote from Kueken531: Go

    A BankList.xml file is created, even when not using BankPreload

    That is because the file needs to be overwritten even if you didn't make any preloads, since there might be some in the map already.. Which means that the BankPreload file IS part of the output that is going to be put into the map, so...

    Posted in: Third Party Tools
  • 0

    posted a message on Galaxy++ editor

    Update to 1.7.1.. fixed some of the bugs you listed, and added a couple of features.

    • Added implicit casts from fixed, int, bool and color to string, and from fixed, int, bool and string to text. (text t = "foobar" + 2;)
    • Added cast expressions (int a = (int)2.2)
    • It is now possible to make multiple declarations in one decl (int a=2, b, c = a + 1;)
    • Fixed a crash that occured if renaming a file that was not open.
    • Fixed a crash that occured if EOF was encounterd unexpectetly, and the user double clicked the error message.
    • If pressing compile and run, the compilation fails, the error fixed and only copile pressed, it will no longer launch Starcraft II.
    • Fixed a bug that prevented the suggestion box to see first statement of an initializer as being inside a method.
    Posted in: Third Party Tools
  • 0

    posted a message on Galaxy++ editor

    I find it very hard to get a feel for how many people actually use this tool. I don't see any way to see download count or anything - all I really have to go for is this thread.

    The editor has come a long way since it was first released, and I will keep developing it as long as I get feedback, but I would be lying if I said I didn't care if anyone use it. After spending so much time on it, it would be nice to know how many people actually find it useful, and to how many it's just another tool floating about.

    Posted in: Third Party Tools
  • 0

    posted a message on Galaxy++ editor

    It is uploaded.. but a moderator must approve the files first - I might be trying to infect you with a virus or something ;)

    Edit: Added a documentation on the asset page:
    http://www.sc2mapster.com/assets/galaxy-editor-beier/

    Posted in: Third Party Tools
  • 0

    posted a message on Galaxy++ editor

    Uploaded the next big update. The language is getting quite a lot of features - think it's about time to get started on a good documentation. I'll make it on the asset page.

    This is what I changed for this release (1.7.0).

    • The compiler now removes dead code (code that can not be reached by any execution paths)
    • Added support for switches. (#switch (foo) {#case 1: ... #case bar(): ... #default: ... })
    • Added support for people to define a library, its supported versions and any decencies. The initializer of any decencies will be called before the current initializer. All "arguments" and the method body is optional.
    #Initializer 
    (
        #LibraryName = "name", 
        #LibraryVersion = "version2" 
        #SupportedVersions = "version1" 
        #RequiredLibraries = "otherLib1:ver7, (otherLib2:enterprise)"
    )
    {
        ...
    }
    
    • Added support for initializers. (#Initializer{...})
    • If no main entry is defined, one will now be added
    • Added the #InvokeAsync keyword. Use this to run the target method in a new thread. It is not possible to get any return values from this. (#InvokeAsync<ns.method>(args..))
    • Added the #Invoke keyword. Use this to run a function in a new "trigger". Doing this will reset the ammount of operations you can do. (#Invoke<namespace.method>(args..))
    • Fixed a bug where multiple assignments in one statement caused a crash.
    • The editor now supports hexadecimal(0xaF) and octal(057) numbers.
    • GUI trigger data is now being removed from the map when compiling.
    • If you have a non-literal TriggerCreate, and two triggers of same name, the compiler now reports it as an error.
    • Fixed a bug where the compiler would not see renamed files as a reason to allow recompilation.
    • Fixed an error where the name of a renamed file would not change in the editing window.
    • When renaming files, if they don't end with ".galaxy++", the program will now just append it.
    • In the project view, dragging stuff on top of non empty folders no longer moves the item inside the target folder.
    • It's now possible to refference triggers from other namespaces (TriggerCreate("namespace1.foo")).
    • Fixed a bug that sometimes caused trigger refferences to refference the wrong trigger.
    • Fixed a bug where output files sometimes wouldn't open.
    • Fixed a crash that occured when pressing ctrl + f
    • Added an option for compile and save, for when you want to publish your map.
    Posted in: Third Party Tools
  • 0

    posted a message on Galaxy++ editor
    Quote from Kueken531: Go

    Maybe, if you mark a void function without parameters using #trigger, add the bool parameters and return values automatically?

    Hmm.. I don't know about this.. I assume you want it so that you don't have to supply the two booleans when calling the function, but the same behavior can be achieved by calling an inline wrapper function..

    Quote from Kueken531: Go

    When calling void functions from namespaces, the autocompletion works nicely and only shows members of the namespace after typing the name. When setting variables to namespace members, this does not work.

    I'm not sure I understand what you mean. It appears to be working for me.. Could you give a short example?

    Quote from DoctorGester: Go

    it took only 1 minute lol.

    Keep testing it, need those nasty bugs exterminated :)

    Quote from DoctorGester: Go

    so... can you add the switch construction?

    Sure, I can do switches - I'll put it on my list.

    Posted in: Third Party Tools
  • 0

    posted a message on Galaxy++ editor
    Quote from Kueken531: Go

    As soon as you open the map in the editor, the MapScrip.galaxy file is overwritten and reconstructed by the triggers in the map. afaik

    As far as I can see, it's overwritten if you make any changes in the gui triggers - its a simple test really.. Open and try to run.

    Quote from Kueken531: Go

    I do not talk about the trigger objects in the script, I am talking about the triggers in the actual map.

    Ah, right - Ill look around for the gui trigger data.

    As for the last thing.. you can only use explicit references in TriggerCreate at the moment. By that I mean no dots - the target function must be visible without the dot notation. In your example above, it is visible though. You should write this

    #namespace foobar
    bool foo(bool a, bool b){
        return true;
    }
    void bar(){
        trigger t=TriggerCreate("foo");
    }
    
    Posted in: Third Party Tools
  • 0

    posted a message on Galaxy++ editor
    Quote from Kueken531: Go
    • If you do not finish one line of script and want to start another one, autocompletion won't show up (probably intended).

    Yes, this is intended.. all whitespace are ignored, so you can actually write a statement out on multiple lines, as long as you don't put whitespace inside identifiers. If you don't wanna finish the statement, then you should comment it.

    Quote from Kueken531: Go
    • Also, how do you publish a map exactly? Testing works fine, but publishing it would use the original triggers again, wouldn't it? Do I need to manually import the script files?

    Hehe.. this is something that I didn't actually think about :) Ill create a compile and save button. In the meantime, you can run the map, and find the map that was run in
    "Starcraft II\\Maps\\Test\\Galaxy++TestMap.SC2Map".
    Open that in the Starcraft II Editor, and you should be able to publish it.

    Quote from Kueken531: Go
    • When you add the script files and the map script, you could remove the triggers. They are ignored anyway and just use up mapspace.

    I'm not sure I follow. If I remove all the triggers, the map won't run.. At least not if you had planned to use any of the triggers. Could you clarify this?

    Quote from Kueken531: Go
    • Is there a way to reference namespace functions in triggers? Using the string "<namespace name>.<function name>" does not work.

    Triggers are handled no different than other functions in regards to what they can see/reference. If you have parser errors in the script, the autocomplete list might not be updated (check by compiling). Also, if you are already in the namespace, it will not be suggested in the autocompletion list, since you don't need to use the dot to refference stuff in there (you can still use the dot if you wish though).

    Quote from Kueken531: Go
    • If you just opened an already compiled object, it does not count as compiled, when you test it.

    This is actually intended, but I can add an option for it.

    As for the rest, Ill have a look at it.

    Posted in: Third Party Tools
  • 0

    posted a message on Galaxy++ editor

    @Kueken531: Go

    When I try to delete variables that are not needed in the code you gave me, it only showed me variables that aren't needed. Some of them are being assigned to, yes, so that caused some errors, but if a variable is only ever assigned to, then it's not needed. Remember, the message only promises you that the variable is not being read - not that it is never used. But it is still safe to delete it.

    Posted in: Third Party Tools
  • 0

    posted a message on Galaxy++ editor

    I didn't make it all (yet), but I thought I would upload what I have done.

    • Fixed an error where using short names could rename stuff to an elligal name.
    • Added a way to call the gui function Preload Bank (use #PreloadBank(string bank, int player); - not inside functions, and only explicit literals as parameters)
    • Added line numbers to the editor.
    • Added an option to deactivate files. Deactivated files will not be compiled.
    • Changed the compile/run shortcuts to F9/ ctrl + F9.
    • When compiling, if no changes was done since last successful compilation, compilation will be skipped.
    • Removed some warnings about unused variables that are generated.
    • Hidden folders will now remain hidden during compilation, and when the program is restarted.
    • New folders and files will now be created in rename mode with a default name.
    • Files and folders can now be dragged around - not restricted to alphabetic sorting anymore.
    • Added an option to obfuscate strings.
    • The check for unused variables is now done before merging variables.
    • Fixed a bug that would give multidimentional arrays the wrong size.
    • Fixed a bug that created unnecessary bulkCopyVar variables.
    • Fixed a crash that occured when pressing ctrl-f with text marked.
    Posted in: Third Party Tools
  • 0

    posted a message on Galaxy++ editor

    I'm not sure I follow.. you want an item declared within the namespace to not be in the namespace? If so, that seems like an odd feature..
    If the problem is that you don't want to write the namespace prefix all the time, you could just use the using keyword.

    For instance

    File 1:
    #namespace name1
    
    void foo()
    {
    }
    
    
    File 2:
    #namespace name2
    #using name1
    
    void bar()
    {
        foo();
    }
    
    Posted in: Third Party Tools
  • 0

    posted a message on Galaxy++ editor

    Yeah, I can change the static behavior for my language atleast.. in the mean time, you can use namespaces "#namespace <name>" at the start of the file to declare a namespace for the file.. you can the use same dot notation as for structs to refference stuff in namespaces, or you can use "#using <name>" to be able to refference all stuff in the other namespace.

    Posted in: Third Party Tools
  • 0

    posted a message on Galaxy++ editor

    Okay, that gives me something to do :)
    I should be able to implement most of that..

    Tbh, I wasn't aware of GUI only functions, but I see a file in the map which is changed when calling the bank preload, so it should be possible to implement. If you have a complete list of these functions lying around, it would help me when I get to this.

    Some things to note is that galaxy has a keyword called static.. it makes the function/field private to the file it is in, so that is kind of the private keyword. I do think it is a bit counter intuitive though, so I might still add a #private keyword to do the same.

    Also, to some of the bugs you mentioned kueken..
    You mention not being able to search after the "reached the starting point of search" message..
    I can press find next just fine, and it will restart the search.
    There were also some other errors that I wasn't able to replicate (ctrl-v, array errors, shorter names error). It might help me if you are willing to send me your script in an archive, perhaps in a PM to me? I fully understand if you don't wish to do this - there is a certain degree of trust associated with it.

    Edit:
    The reason you don't get a warning for b and c with "int a; int b; int c;" is that before the check for unused variables, the compiler is looking for variables it can join together, as an optimization. Since a, b and c are not used in the same scope (they are not used at all), they will be joined into one variable. So in the final code, it is really only "a" which is not used, but I'll rearrange the checks to make it more intuitive.

    Posted in: Third Party Tools
  • 0

    posted a message on Galaxy++ editor

    I uploaded a new file.. It now checks TriggerCreate for string constants in order to identify triggers, and I also changed the behavior that you pointed out syltman :)

    I'm sorry that it took so long - I'm working on a string obfuscation feature that proved more difficult than first anticipated. I wanted to include it in this release, but I feel I have postponed it too long. So it'll wait for another release.

    Btw.. I don't think I mentioned it before, but I implemented a feature to search the library or user definitions for functions and stuff in case you don't remember the exact name.. Look under help.

    I'm glad i'm finally getting some feedback on this :) Don't hesitate to shout if you feel your favorite feature has been left out for some reason - it's most likely because I haven't needed it in my own projects, and thus haven't thought about it.

    Posted in: Third Party Tools
  • To post a comment, please or register a new account.