Forum Replies Created
-
AuthorPosts
-
Yeah, that’s my thinking too. We’ll probably want to test things to see what happens with the current state first. Ultimately, the plan is to replace the registry settings with an INI file but that’s a bit further down the list.
Got a big surprise: the whitespace reformatting is done! And pushed up! For a general idea of how large the current commit is, the total number of changes in
project/are around 65000 lines of code 😛Please take a look!
I’ll need a break but after the review and time to recover from that marathon, I plan to work on some admin stuff such as trying to configure Windows build automation to help streamline things 🙂
Yeah, comments may help. I’ll definitely want a good review once I get the whitespace pushed up in a few days. 🙂
Astyle took care of the mixture of tabs and spaces for indentation a few months ago but I always turn on whitespace viewing in my editor to make sure nothing creeps in. I like to use tabs for indentation as everyone has different preferences for tab size. 🙂
Yeah, fonts can be annoying. That’s why I always use a monospace font 😛
In
InitInstance()inproject/MWEdit.cppwe haveCString path = "E:\\GitHub\\MWEdit\\project\\Debug\\MWEdit.ini";. That needs to be changed. Most people only have aC:\partition and sometimesD:\. It isn’t in a conditional so there’s a good chance the program crashes when it hits that line as the file can’t be created or accessed. Not even sure where that INI file comes from. I don’t recall seeing anything about one, just the registry where settings are stored, but I may have missed it. Loading from the registry in that function is also commented out. Just did a search and that’s the only line where that file is mentioned:grep --recursive -n "MWEdit.ini" . ./project/MWEdit.cpp:358: CString path = "E:\\GitHub\\MWEdit\\project\\Debug\\MWEdit.ini";The next line says it changes the name of the file before it’s used so the file path may not be an issue. I’m still not sure it uses an INI file but I’ll go back and check after I look at setting up build automation. I’m also still concerned about it trying to read from the registry without initializing the registry path first but I don’t know anything about working with the Windows Registry through code, just as a user.
A few lines later, it tries to read from the registry even though the loading from registry code is commented out. This will take investigation for sure so we probably want to get it up on the issue tracker
May be fixable by simply uncommenting the registry lines and commenting that line.
For reference, here are the lines that concern me:
/* Change the registry key under which our settings are stored. */ //SetRegistryKey(_T("MWEdit")); //FindMWRegistryPath(); //Create the .ini file in application's folder CString path = "E:\\GitHub\\MWEdit\\project\\Debug\\MWEdit.ini"; //First free the string allocated by MFC at CWinApp startup //The string is allocated before InitInstance is called.. free((void *)m_pszProfileName); //Change the name of the .INI file. //The CWinApp destructor will free the memory. m_pszProfileName = _tcsdup(_T(path)); /* Load standard INI file options (including MRU) */ LoadStdProfileSettings(0); /* Load the options from the registry */ m_Options.ReadFromRegistry();Edit:
Looks like some of the fonts are hardcoded to use
MS Sans Serif. We’ll probably want to change them down the road to use more generic font aliases to allow more font flexibilityOn a similar note, the descriptions for the resistance functions just say things along the lines of, “Get resistance”. They should probably include the stat that they are resisting in the description for completeness
Side note: this is going to be a huge commit when I’m done with the whitespace in this directory. 😛
Saw Moon the other day and it was pretty well done. The limited amount of characters helped a lot as it kept the film from losing focus.
Not sure if it’s the same cut that I saw but it looks to be the same film 🙂
Yeah, that is an odd coincidence. Usually, they take stage names to keep their names from getting confused like that.
Saw Resurrections a few years back and didn’t care for it all that much. The first half felt more like it was a recap while the latter half was Neo trying to figure out why he was broken. Felt like it was relying more on nostalgia than anything new.
Started watching anime again after several years hiatus. Had some trouble getting back into it at first due to the break so I threw Black Clover on and it’s been smooth sailing since. 🙂
Yeah, we’ll definitely want to expand on the function descriptions to explain why something is broken.
Elsewhere, a compiled help file is referenced but there doesn’t seem to exist any file that sets one up in the repository so more digging is probably needed. It may be using the one in the original CS, which would be strange as MWEdit is a replacement
CHM files were deprecated a while back, weren’t they? Did Microsoft issue a replacement or do we need to look at third-party libraries for a built-in help system?
Yeah, we’ll need to see how things change with the macros. First order of business is to change them all to
static constexprtypes for modernization and optimization reasons. That file in particular is quite long so replacing the somewhat meaningless abbreviations may be painful (it’s about 8500 lines after the reformat) anyways.Tabs are used only to indent blocks while spaces are being used for alignment. Don’t worry, all macro sections are being lined up with additional spaces to make them look nice and pretty 🙂
Got another one to be added to the issues list:
Function = CellUpdate Options = 0x2000 Opcode = 0x1013 Return = 0x2, "None" Desc = "Broken. Updates the current objects cell position." EndIt’s possible this is related to issue 4. Unless, that is, it means the game itself. The Face function has something similar so I’m leaning towards the latter. In which case, the functions that are mentioned as broken need to be checked in OpenMW and a note added if OpenMW fixes them.
This file is a long one and needs to have its extra newlines removed. Lot of pressing the
DELkey 😛In an ideal world, I’d like for it to use
std::stringfor string types andchar *(or whatever the current standard way of doing it is; I’ve even seenint *used) for raw data blocks. IfCStringimplements more thanstd::stringthen we may be able to simply create a subclass and go from there. Will add it to the list!Still reformatting. Been on the script functions file for a few days now. It’s another one with a lot of arrays. It started out less than a thousand lines of code and is now hitting 6,000 😛
At some point, it may be a good idea to move some of these to-list items to the issue tracker so we can better keep up with them
project/EsmScriptFuncs.cppdefines short versions of the macros for the script functions and you can’t tell what the names mean at a glance. For an example, it defines0asVNandESMSCR_FUNC_BYTEasVB. These should probably be changed to use the long formEdit:
Looks like I should be done with the bulk of the whitespace reformatting sometime next week or the following week. I know for a fact I missed a few bits here and there but I’ll get those as I go through and do the other cleanup tasks.
I’ve spotted some stray symbols here and there so there may be some syntax errors that need to be resolved when we run things through a compiler. We’ll find out!
No idea why they chose that name! It’s definitely not water proof or large enough to take into the waves 😛
For me, I tend to use the aloe infused Irish Spring bar soap. Always has my skin feeling just right and I do like the subtle fragrance. 🙂
Robin sold the Nexus the other day. From the sounds of his post, he simply got burned out after twenty plus years of running the site.
The script compiler has some form of support of an old version of MWSE. It’s not enabled by default and must be turned on at compile time. It may be worth having the MWSE devs take a look at those bits of code and seeing what kind of state it’s in.
l_EsmScrCharTypescould use more comments for its members. Right now, only a handful are commented so we’ve got long strings of macros and0s that are just sitting there, purpose unknownThroughout the code, the program uses a mixture of custom string types and standard string literals. Ideally, these would be reduced to the types just in the standard but we’ll need to investigate further. The custom string types are a mixture of a character array
TCHAR *(not sure what TCHAR stands for) and its conversion function looks to be_T()and there’s another type calledCString(). Then it also uses standard type string literals but not standard c-strings or C++ string types.Edit:
Finished reformatting the whitespace in the script compiler. I’ve gone ahead and committed and pushed up the changes to that file separately as the file was 5500 lines to start with and I didn’t want to risk losing those changes. Will get the rest of the
project/directory up with the rest of the files.Decided on Attack of the Giant Leeches. Lot of fun but I fell asleep for a good portion due to exhaustion the last few weeks and not having gotten my regular naps in so I’ll need to give it another whirl soon. The costumes were suitably absurd with the requisite over-acting typical of Corman films. Great B-movie!
After the Yesterday Machine, may put on Monster from the Ocean Floor. Yep, I love being able to get all of these B-movies easily 😀
This one popped up the feed yesterday and looks quite good so I’m going to go ahead and add it to the list as well.
Also rewatched A Boy and his Dog, which is always great fun. Sadly, the copy on Tubi wasn’t the best copy and had a ton of artifacts and other oddities. It’s possible the Blu-Ray is better preserved. Still a good one to add to my disc collection regardless so I’ll add it to the shopping list 🙂
Sadly, I can’t get either of those 🙁
project/EsmRecDialog.cppandproject/EsmRecDialog.hmay be broken. It createsGetControlData()but makes it an empty function so we’ll want to test that window to make sure everything works okay before I remove the empty function. From what I can, that class deals with adding a new record so that’s where we’ll want to look. Right now, I can’t tell if it’s an override or the base class as I haven’t found a good class diagram generator that includes a bunch of stuff we don’t need so we’ll need to go through the inheritance chain by hand to check.It should be easier to sift through things once I fix up the includes. As it is, MWEdit doesn’t include the files it needs explicitly in each file, relying on the includes from other files it does include and some VS assumptions, so fixing that up will help tremendously with sorting out what’s what.
Buffer.Format(_T("%d"), (int)(byte)pLongData->Strength);
Those lines can probably remove the byte cast as they just cast it to int before the variables are used anyways.Yep, Tubi is a fun place!
Yep, seen Chopping Mall. It was pretty fun but I’m mostly out of killer robot films now 😛
Haven’t been watching too much lately, been doing a lot of reading, but I did catch Beneath the Planet of the Apes last week. Definitely not as good as the first film but was still pretty fun.
Going to add The Yesterday Machine to the list. Of course, I may watch Attack of the Giant Leeches first. 😛
There are a variety of cases where
OnUpdateItem(esmrecinfo_t *pRecInfo)is an empty function, simply returning 0. Not sure how necessary it is for all uses but I suspect that it can either be removed or moved to the base classes, being overridden as needed.It appears that GitHub has some sort of CI support for MSBuild. Don’t know if it’s a paid feature or what but I’ll take a closer look at it once I’m done with the whitespace formatting. There’s a chance it won’t work due to the generated code but if we can at least get a Windows build out (there’s currently no build of the program available anywhere except maybe on SourceForge), then that changes the ballgame somewhat and buys us some time with getting the build script together (it’ll be easier to get a build script written once the generated code and DevIL are sorted out).
Edit:
Decided to start looking now. It looks like it’s sort of free: https://docs.github.com/en/billing/managing-billing-for-your-products/managing-billing-for-github-actions/about-billing-for-github-actions
500 MB isn’t a whole lot for regular builds but does give us about 5 – 10 static builds a month, even more for dynamic builds. We won’t be hosting the *nix builds ourselves as library configurations are different for each distro, so more chance of things breaking. For *nix, we’ll simply have the build script and possibly the recipe for package deployment
Here’s some information regarding set up: https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners
Edit 2:
Looks like we can set up custom commands, too. So a build script for the build script? 😛
Will take a closer look later. It uses YAML for the configuration, which I’ve never used before. However, overall, the syntax looks pretty self explanatory. Not sure of the system, though. When I get there, I may start off by looking at the MSBuild template and going from there. Will also need to see how it stores the builds and if we can access them. Time will tell. Still have a while before I can really look at it detail, though. I’m only about halfway through the project directory
I prefer OpenSUSE’s zypper but, sadly, I’m stuck on a .deb system here. pacman is pretty good, too.
Yep, I use Synaptic all the time to help fill in the blanks. Use apt for installation and everything but Synaptic has helpful features that I use for querying information. It also has a pretty good categorical view, which is pretty nice.
Yeah, Audacity has been a bit messy since the new folks took over. Granted, I haven’t needed to use the program since around 2015 or so. There are some pretty good alternatives on the Arch Wiki (it’s really good for finding cross-platform alternatives). A lot of those are for *nix but some of them are also available on Windows.
Sound in Windows got weird with the changes in Vista. They added an abstraction layer and then removed a ton of features from the audio APIs. Sound cards were broken for years until they finally caught up with the changes. Perhaps the current difficulties are related to the changes?
The
IsModified()function in the GUI classes can be optmized.This is an example of what we have currently:
if (m_IDText.GetModify()) { m_Modified = true; } if (m_NameText.GetModify()) { m_Modified = true; }Right now, it checks each condition even though m_Modified is already true so we can change it to else-ifs after the initial if with a default return value of false. That will save a lot of checks when the program goes through those functions
Edit:
There are also blocks like this:
if (pInfoData->Disposition < 0) { pInfoData->Disposition = 0; } if (pInfoData->Disposition > 100) { pInfoData->Disposition = 100; }They can also be optimized into else-ifs. If the first if succeeds, then we already know the second one doesn’t apply.
Side note: still deleting all of the extra newlines.
This looks like a handy device to toss in my bag to work as a scratch pad so I don’t need to waste paper on a basic calculation that I don’t need to save. Cheap enough, too. Looks like off-brand ones are even cheaper at around 2 USD each
-
AuthorPosts
