I had a quick try at separating out the editor. Unfortunately it's rather ugly and you will probably not want to accept the code!
The slightly tricky part is the coupling between the globalConfig object and the editorConfig. I did try a different approach where I separated out the parts that the editor needed (screen width, screen height, error msg, error line, framebuffer, SDL surface, etc) entirely so that they could be more easily shared but the diff was getting too big at that point.
The worst thing about the change I've made is the circular include to load81.h. It can be fixed with another header or more restructuring but again, I didn't want the diff to be too large.
Anyway - I didn't want you to think I was being lazy asking you to do this so at least I had a go at it but please don't feel you have to accept my mess of a patch - maybe best to view it as how now to do it :-)
Hi,
I had a quick try at separating out the editor. Unfortunately it's rather ugly and you will probably not want to accept the code!
The slightly tricky part is the coupling between the globalConfig object and the editorConfig. I did try a different approach where I separated out the parts that the editor needed (screen width, screen height, error msg, error line, framebuffer, SDL surface, etc) entirely so that they could be more easily shared but the diff was getting too big at that point.
The worst thing about the change I've made is the circular include to load81.h. It can be fixed with another header or more restructuring but again, I didn't want the diff to be too large.
Anyway - I didn't want you to think I was being lazy asking you to do this so at least I had a go at it but please don't feel you have to accept my mess of a patch - maybe best to view it as how now to do it :-)
Thanks,
Phil