The first case CImage.cpp includes CBlit.h which in turn includes most header files in both software driver modules. I have created two files: image_utils.h and image_blitter.h which contain only the functions used by CImage.cpp . Thus if we aren't interested in the software renders we can just ignore this part of the source completely.
Case 2, the file CFileSystem.cpp includes headers for achives without checking if the user has disabled their use. I modified it to this and it appears to be working fine:
Code: Select all
#ifdef __IRR_COMPILE_WITH_PAK_ARCHIVE_LOADER_
#include "CPakReader.h"
#endif
#ifdef __IRR_COMPILE_WITH_NPK_ARCHIVE_LOADER_
#include "CNPKReader.h"
#endif
#ifdef __IRR_COMPILE_WITH_TAR_ARCHIVE_LOADER_
#include "CTarReader.h"
#endif
#ifdef __IRR_COMPILE_WITH_WAD_ARCHIVE_LOADER_
#include "CWADReader.h"
#endif
#ifdef __IRR_COMPILE_WITH_MOUNT_ARCHIVE_LOADER_
#include "CMountPointReader.h"
#endif
#ifdef __IRR_COMPILE_WITH_ZIP_ARCHIVE_LOADER_
#include "CZipReader.h"
#endif
Case 3, it's a similar case with CSceneManager.cpp . Even we disable most functionality with defines the scene manager still includes most headers. I'm still working on this.
Case 4, using the GUI with a builtin font requires the BMP image loader to be compiled (didn't test it but that's what the source comments say).
There reasons why i'm trying to remove include dependencies is: i'm working on a new build system based on Lua scripts called Robocop (for the moment); i wish to put parts of the code into dynamic libs (drivers, loaders, extra secene nodes, etc) that can be queried at runtime and loaded loaded dynamically as needed; combine all the useful utility code and os access functions found in Irrlicht into a compatibility layer api (called PCLib) that can be developed and improved separately.
I will open a few github projects soon for this (Robocop, PCLib, and PCIrrlicht) so if you are interested in these modifications you can find them there.