Okay, got the blog post up: https://stearnvault.com/mwedit-0-6-3-released/
Looks like I need to add the code tag to the style list that the editor class is in. Will add that to the list!
I think I’ll go ahead and add the license at the end of the week if I don’t hear back from the others. In my previous communications, they didn’t seem too bothered so I doubt it’ll be an issue but I’d like to try and get formal permission first. Already talked to Dave and he’s all for making our repo covered by the MIT license
Okay, the MIT license has been added π
The CI also caught a few parentheses (turns out I’ve been spelling it wrong in the commits, oh well) that I accidentally removed during the editing I’m doing. That’s a good thing! That’s what it’s for!
Copyright notice may need to be changed to Dave or UESP. Not entirely sure, I’ve asked Dave in the issue. It’s weird because we’re licensing code that wasn’t licensed before so there wasn’t an existing copyright notice but the parallel was licensed as the MIT with UESP being the copyright holder. Little bit confusing.
We now have a Discord server: https://discord.gg/AAAnesEgJe
I think everything is set up properly but we’ll find out!
We’ll probably want to add some of the additional information to the first post, including the thread links.
I’m seeing some notes like this: TODO: Proper autocalc. We’ll probably want to decipher them as they look important. There’s also a to-do list in the docs folder that may help shed some light on things that I haven’t gone through yet.
Still waiting to get my account approved at the UESP forums. I’ll probably need to poke them at some point.
We may also want to update the link on the UESP Wiki, too, or at least add an additional link to our fork as it still points to the old Sourceforge page. Wouldn’t be a bad idea to ask the UESP wiki folks first. I’m not entirely sure of their etiquette regarding that sort of thing
The talk page on the wiki has some interesting points, as well. Can confirm that there’s little BSA support so we’ll want to look at adding that in at some point. As I recall, BSA files consisted of a block for the flags, file list, size, and then the data compressed using zlib but I last looked into it circa 2013. Will create a new issue!
Some of the arrays have stray commas in them. I forget if an empty comma means it’s automatically initialized to zero or whatever but that’ll need to be looked at before the strays are removed.
Here’s an example from EsmSoundGen.cpp:
const TCHAR *l_SoundGenTypes[] = {
_T("Left Foot"),
_T("Right Foot"),
_T("Swim Left"),
_T("Swim Right"),
_T("Moan"),
_T("Roar"),
_T("Scream"),
_T("Land"),
};
The final element has a stray comma. It’s possible that it automatically sets the missing element to zero but I’ll need to relearn that. If so, then the zero or null values need to be added instead of a blank entry. If it means nothing, then the strays should probably be removed.
project/EditViewObj.cpp can be removed. It’s an empty source file and not mentioned in any file at all and doesn’t have an associated header file. Same with project/EditViewSort.cpp. Will remove them when I rename the couple of files that need it.
Edit:
I think we can remove the stray commas as we have this in project/EsmContainDlg.cpp:
static esmcoldata_t l_ItemColData[] = {
{
_T("Count"),
ESM_FIELD_CUSTOM,
LVCFMT_CENTER,
ESMLIST_WIDTH_COUNT + 20,
ESMLIST_SUBITEM_COUNT,
l_ContSortCallBack
},
{
_T("ID"),
ESM_FIELD_ID,
LVCFMT_LEFT,
ESMLIST_WIDTH_ID,
ESMLIST_SUBITEM_ID,
},
{
_T("Mod"),
ESM_FIELD_CHANGED,
LVCFMT_CENTER,
ESMLIST_WIDTH_CHANGED,
ESMLIST_SUBITEM_CHANGED
},
{
_T("Name"),
ESM_FIELD_NAME,
LVCFMT_LEFT,
ESMLIST_WIDTH_NAME,
ESMLIST_SUBITEM_NAME
},
{
_T("Type"),
ESM_FIELD_ITEMTYPE,
LVCFMT_LEFT,
ESMLIST_WIDTH_INDEX,
ESMLIST_SUBITEM_ITEMTYPE
},
{
NULL,
0,
0,
0
} /* Must be last record */
};
It uses a mixture but the number of elements also differs in each block. Not entirely sure, more research is definitely needed.
Doesn’t look like we’re getting much feedback regarding the release. Was kind of hoping to learn more about what was broken and needed updating after being in cold storage for twenty years. Anyways, let’s just keep pushing forward. Still have a lot of readability and compatibility updates to do anyways. The latter may very well fix some oddities that aren’t being reported π
More conditional compilation lines that can possibly be removed:
#if !defined(NO_ESMLIST_EDIT)
That’s in project/EsmListCtrl.cpp and project/EsmListCtrl.h. From what I can tell, that macro is used to disable the editing of the records of each file (not entirely sure as the files are undocumented). It may be for debugging reasons or something else. Will need investigating before we disable that check to make sure the files work correctly. The macro is disabled by default so you need to tell the compiler to disable editing so I suspect that the conditional is no longer needed. It’s not hurting anything by leaving it in, other than slowing down compilation by a few nanoseconds and looking weird in the code.
In any case, it’s another line that needs to be changed to #ifndef NO_ESMLIST_EDIT at the bare minimum for modernization π
Got another one to investigate: https://github.com/Walrus-Tech/MWEdit/blob/master/project/EsmScriptCompile.cpp#L6301
The return statement terminates the function before it does anything at all yet the rest of the code is uncommented. We’ll want to see why it terminates early and remove something depending on the reason. If it’s an error, we can remove the return. If the rest has bugs, we’ll need to make a note of that. And so forth
The differing number of items in each array element definitely has to be checked so the functions using them have the right fields. if they check out, doesn’t harm to add a NULL to the end of each of the following 5 items.
The Return 0 looks like a booboo left from a debug, yeah it’ll want to be checked for sure. π
Yeah, I’ll plan on looking at the loops and other things that work with them and see how it’s all handled. It’ll be easier once more of the reorganization is done as we’ll have a better handle on what uses them.
There are also some commented lines in there that look important. They copy the expression stack into memory for later output into the final product. Definitely need to test the script compiler to see what the current state of it is. Already have an issue to review dead code but I’ll add a note that it could be affecting the compiler’s behavior.
Edit:
Okay, note added.
I just finished removing all of the unnecessary parentheses and void parameters. I also think I finished fixing up all of the whitespace changes I missed before. Gone ahead and pushed everything up and they pass the CI
The readability of the code improves all the time!
I probably should take a break for a few days before moving to the next task but my last break only lasted an hour before I got bored. π
Will decide tomorrow!
I’ve started cleaning up the header files the other day. The initial pass isn’t a big job and mostly consists of removing excess stuff but I’m going to take my time on it so I don’t wear myself out like I did with the last run.
I’ve added most of what I can think of to the issue tracker but there’s bound to be stuff in the thread that I missed. Feel free to add anything you don’t see already in the tracker π
Started on the GUI header files the other day and I can do some cleanup but a lot will need to wait until the generated code is sorted out as I’m not yet comfortable editing the generated code templates on account of not being familiar with the syntax and don’t want to risk messing it up.
Okay, first round of the header cleanup has been pushed to dev. Will decide on the next task soon!
Corrected the file names of the few files that needed it to be consistent. There are others that don’t follow the patterns as well that I may change too as I’m being a little nit picky π
This shouldn’t affect the Windows build but we’ll still want to adjust the file names in the build file all the same at some point.
Edit:
Okay, the project files have been updated.
I may clean out some of the older project files that are no longer needed. What do the filters files do in VS? Do they need to stay?
You mean the vcxproj filter files – they’re for project file organization. If they are not custom filters, then safe to remove. To test, remove them and load the project in VS, hoping everything is where they should be. π
It groups things by record sub-type so it does some custom categorization. It’s pretty basic, though, so we may be able to remove it once we restructure the directory (after the build script is written). The older vcproj file can be removed as it’s already been put through the upgrade process to vcxproj, correct?
MWEdit precompiled headers extensively (most headers are set up this way in the project files). This can be changed as they’re not part of a header-only library. I’ll open a new issue for it.
Edit:
https://github.com/Walrus-Tech/MWEdit/issues/30
One of these days, we’ll get to going through the thread and copying the rest of the stuff into the issue tracker…. π
Definitely for the bin. π
Amassing a fine bunch of issues so it looks like priority labels are in order – cake – fruit cake – fruit cake with icing – fruit cake with icing and glacΓ© cherries … or such. π
Okay, the old project files have been removed locally (the upgrade log, old solution file in Backup/, and MWEdit.vcproj). They’ll be in the next push π
Been trying to get better at adding labels for organization but it’s not something I’m good at keeping up with…. π
Out of curiosity, are you able to add/remove labels for issues and pull requests? You should be able to but, if not, I’ll check the settings. π
Now that I have a better understanding of the project after spending months diving through everything, I may try to take another stab at the build script soon as it’ll help significantly with a lot of the cleanup, management, and organization tasks. GitHub Actions doesn’t have native support for Meson so that’s another thing to figure out if Meson is chosen. Lots to learn!
Edit:
The open dialogue needs fixing. It doesn’t open a File Chooser dialogue so you’re unable to select files from anywhere and are limited to wherever MWEdit is set to search for files
