-
Notifications
You must be signed in to change notification settings - Fork 223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Various additions and improvements (read comments) #30
Conversation
Moving up
move to latest
…cleaned up - Implemented Timeline data structure internally, added semi-partial editor - Added partial editor for Shaders - Added semi-partial editor for Extensions - Implemented physics shape vertices on GameObjects (could cause errors without them) - Renamed variables in gameobject event actions to their proper names/meanings (as well as the Awake variable in GameObjects) - Made string references in the editor more clear as to when they are null or empty
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I will check and merge this soon
@@ -372,6 +372,12 @@ private async void DecompileCode(UndertaleCode code) | |||
possibleObjects.Add(data.Fonts[id]); | |||
if (id < data.Sounds.Count) | |||
possibleObjects.Add(data.Sounds[id]); | |||
if (id < data.Shaders.Count) | |||
possibleObjects.Add(data.Shaders[id]); | |||
if (id < data.Extensions.Count) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can extensions actually be referenced in scripts by ID? If not, then this is just cluttering up the context menu list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I kind of recall that being possible somewhere, but now I'm not so sure. I put it in just to be safe, but if it's unnecessary, I guess it's okay to get rid of it.
Thanks for the feedback, some of these things I didn't even have the time to fully test. I'll try to fix some of these when I get the chance. To add to that list, though (I really should have explained everything I noticed, I don't know why I didn't now):
By the way, by that global initialization script editor, do you want it to be linked to by the editor somewhere, like in the tree? |
I think it should work similarly to the "general info" tab, because the chunk does not contain any objects itself and just points to entries in the CODE block |
The reason the editor fails to update objects is probably because you need to manually specify |
I apologize for the long time it's been taking to work on these changes. I've been pretty busy and I just got started on it now. |
…issue - Added global init editor (kind of?). Not sure how to make it appear like "General info" - Added margin to string references in shader editor - Removed "buggy editor" message to get a more final look - I was unable to get the string references to update, and also have yet to figure out how to keep the background of the textbox white when highlighted in a list - Room editor issue fixed: now it accounts for scale properly, at least for the most part.
I forgot to include this in the commit message, but I also fixed the vertex shader attribute list not being initialized and removed extensions from the "possible objects" list. |
I also just did some additional work on demystifying the GMS2 room format, as well as part of the old room format that somehow wasn't implemented yet (room creation code). Edit: Sorry if there's a lot of these messages, I tried to do this when GitHub had an outage... I believe it's all gone now though. |
Thanks! I tried to get that shader attributes editor to work and I have no idea how to do it. In other places it works fine when the UndertaleString is wrapped inside another object. I know this is ugly, but how about something like that as a temporary workaround: class VertexShaderAttribute : UndertaleObject
{
public UndertaleString Name;
}
List<VertexShaderAttribute> VertexShaderAttributes; For the general info editor, the easiest way would be probably to literally replicate how the general info editor works, just with one List instead of the other objects (look for GeneralInfoEditor in MainWindow.xaml.cs) Is there anything else unfinished except these two things? (and the string editor background, but that's a minor thing that can be fixed later) I would like to merge this soon, there are quite a few improvements in this pull request and it would be nice to release a new version with them. |
… changes. - UndertaleShader.VertexShaderAttribute is a new class, and the list of them is now integrated with UndertaleIO's SimpleList because of that - (of course, if you didn't read the commit title, the editor for it is now operational as far as I can tell) - The code for selecting tree items was honestly a little messy, so I cleaned it up a bit - Global init script editor (todo version) has been added completely now
The UndertaleObject implementation works like a charm... I managed to also take advantage of the existing UndertaleIO code to make it more consistent, like You can read the description of the last commit for everything else I just changed. That should be about it, except I still haven't gotten the string editor background to work, of course. I tried working on it before but to no avail... |
- I properly named every variable for Backgrounds, with proper types etc. - Background editor now supports GMS2 values when available - Fixed chunk padding issues- before, determining the last chunk was not done properly - Fixed an issue with the EXTN chunk losing data at the end - this was due to an oversight I made when documenting the chunk, but now it's implemented. Basically for each extension there is, there are 16 bytes of data appended to the end, based off of some product ID for each.
One minor problem still remains: when moving scaled objects around in the room editor, their center origins do not update until you stop moving them. |
Also, I just realized I may have broken a bunch of stuff... hold on. |
Alright, so that's fixed. I accidentally included padding calculations in the loop that detects the last chunk, but I just found out that the chunk length includes the padding in it. |
…e files can now load (no exporting, however)
So now instead of getting an exception message when loading bytecode version 14, now it just loads the file but ignores the sections with code. It also disables exporting because at that point it's useless and would likely fail anyway. This can easily be changed in the future if/when support for bytecode 14 gets added, because I made the check for whether or not bytecode is supported happen in one place. |
I kinda need your CanSave changes right now so... time to merge this... pleasedon'tbreak Next time, could you please avoid useless merge commits at the beginning (if you have remotes set up correctly just do |
Ah, all right, will do. Sorry about that. |
I just did a bunch of work on the tool and library.
Here's a copy of what I said on my commit with the changes:
There's only one issue with it, and it is that the vertex shader attributes list editor (in a new shader editor) is currently a bit buggy, and I'm not quite sure how to fix it. Let me know what you think.