• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

WIP Cleaning up the code

Levis

Find(Rum) = false;
Staff member
Administrator
Creative Support
Programmer
Storm Modder
We should slowly start to clean up the code some more also.
Before build 14 I hope we can have a bit cleaner code.

This means:

Finding functions which aren't used anymore and removing them
Moving all native declared functions to one place (globals.c ?)
Moving all defined toggles etc to one place (globals.c ?)
Checking if some toggles etc can serve a double function so we can get rid of some of those
Moving some functions to the appropriate files (files like dialog_func, and the files of maximus and NK etc have functions from all over the place I'd say we try to put them where possible in the right place.
Checking all translated strings for interface etc (the INI files) and see if some are double or not used and organise them better

So who wants to do what :p?
 
Not sure if we should put much effort into this one yet.
Technically it would be better if it is done of course, but a lot of this isn't broken so trying to change it might be risky and cause more issues.
 
Like I said we want as much of it done before the final build 14 release. It could cause problems but it might also solve some. And it brings down the download size. Speaking of that we should try to also check if there are unused textures.
 
Removing unused code wouldn't do much for size and performance, I think.

We did that already did a large cleanup on sub standard ships and unused ship textures a few years back.
What I did back then was to remove ALL ship textures from the game, then use console to cycle through them all and use the missing textures entries in system.log to put only the used ones back.
I'm afraid it would not be that simple for other textures though and might be either quite risky or quite time consuming.
 
@Levis has been doing some work on this again by finding and disabling unused functions. :woot
 
@Levis has been doing some work on this again by finding and disabling unused functions. :woot
Well I'm looking for functions with large loops in them etc :p. So when I find one which isn't used I disable it instantly. Hopefully we can get rid of some of the old code soon.
 
Back
Top