AdAstra-LD / DS-Pokemon-Rom-Editor

New DS Pokemon ROM Editor, based on Nømura's 2020 edition. Expanded with loads of new features, bugfixes and better usability.
164 stars 45 forks source link

My refactoring5 branch #15

Open cuddlyogre opened 1 year ago

cuddlyogre commented 1 year ago

https://github.com/cuddlyogre/DS-Pokemon-Rom-Editor/tree/refactoring5

I have plans to do my own edit. Something focusing less on battling, and more on catching and showing them off. To do that, I needed to add a few missing functions.

I've added level script editing, improved script search, headbutt encounter editing, safari zone encounter editing, and an encounter report for HGSS. I have plans to implement the move tutor as well. Basically, I've implemented, or plan to implement, everything here: https://hirotdk.neocities.org/FileSpecs

The problem is that in order to even work on the project without it crashing Rider and VS, I had to do a ton of refactoring. What I have now is very clean and has no problem opening on my machine, but has branched significantly from upstream.

I'm not suggesting you replace your main branch with my work. I am more curious if you have an idea how we could integrate my work into DSPRE.

AdAstra-LD commented 1 year ago

I just had the chance to take a quick look at your branch and... okay. Over a hundred and 40-something commits. I can tell there have been many changes. Like, the effort here is commendable but nothing is even slightly documented.

Predictably, Git has no idea how to merge the two branches and, honestly, me neither.

cuddlyogre commented 1 year ago

I completely get the surprise at the sheer amount of changes.

I'm not surprised about the automerge. The entire project was refactored in an effort to get the project to load. The quality of the branch is also a side effect of the troubles I had getting my IDEs to load the project without freezing and crashing.

I'm pretty sure the main culprit is the size of Main Window.cs. There are a ton of controls which slows down both Rider and VS2019. Moving the tabs to their own user controls sped things up considerably. As I moved them to their own user controls, I cleaned up duplicate code and logic, which corrected my next point.

There is some kind of glitch with the SimpleOpenGlControl that causes some kind of memory leak which crashes VS2019 seemingly at random when you go into an editor tab in design mode that has one. There is also something that freezes VS for several minutes at a time. You can force quit VS to recover from it, but you lose work in the process.

I don't know how to proceed. I would like to submit my feature changes, even if it meant discarding the other changes I made. But I can't get that far without the changes I made.

AdAstra-LD commented 1 year ago

See, I always take this stuff very seriously so... I think I'm gonna review the commits one by one and cherry-pick them upstream lol. I wanna make sure I fully understand every change and the reason why it was made.

Thing is, I don't fully get some of them just by looking at the code. I mean, the code changes are all clear (individually), but sometimes I guess I just don't get the bigger picture and the commit messages are not... really helping.

So yeah, I would greatly appreciate if you could clarify a few things for me from time to time. (Not sure if Git issues is the best way to do it but... you tell me haha)

cuddlyogre commented 1 year ago

Of course!

I think keeping the discussion in this issue will be best so we can use it for documentation.

BluRosie commented 1 year ago

would it be alright if i individually pr'd a few features? particularly the encounters tab with the safari and headbutt trees