Author Topic: DLL/plugin system.  (Read 1073 times)

Offline Skybuck

  • Colonel
  • ****
  • Posts: 223
    • View Profile
DLL/plugin system.
« on: May 13, 2022, 09:32:14 am »
I have this funny/crazy idea of converting each C++ class to a DLL. Since this code seems so nicely object orientated and somewhat disconnected from each other.

It might actually be possible to stuff these classes into DLLs so that parts of this game become accessible to other programming languages where then the game can be manipulated or extended by writing DLLs in other programming language.

Some benefits could be:

1. By-passing SDL limitations/short comings in color depth and sound depth and/or surround sound.

2. Reducing C/C++ compilation times.

3. Stepping over DLL methods, though less easy debugging in case something goes wrong inside the DLL ;)

4. (It may also free-up some namespace to be re-used to write new modules)

Alternatively the opposite could be done:

4. Some DLL loading plugin system, which gets called at certain points in code, but then DLL writer mostly has to inject those points themselfes.

Unless game already does that as some kind of "genuines" for-sight ! ;)

Injecting all kinds of "plug in hooks" so that certain parts of the game can be extended with plugin calls haha !

Anyway to experiment with this idea the biggest point of interest for me right now is:

Map::Draw

or even more specific:

Map::DrawTerrain

In between existing code some plugin system could be created to give other DLLs an oppertunity to do extra graphics/special effects in between the X,Y,Z layers of the Tiles of OpenXCom...

Perhaps also some initialization before start of the loop, finalization after end of loop...

And perhaps even some after effects when entire map is drawn hehe, maybe escorted by some masks, to mask of GUI part of screen (or simply a bounding box) ! ;)
« Last Edit: May 13, 2022, 09:37:20 am by Skybuck »