20 Commits

Author SHA1 Message Date
Kawe Mazidjatari
e6eabc2cb8 Make plugin path a define 2023-07-16 12:04:34 +02:00
Kawe Mazidjatari
83d7f0b9f4 Light code cleanup
- Use game's filesystem in 'Mod_GetAllInstalledMaps'.
- Reorder parameters of 'AddFilesToList', and add option to override path separator.
2023-07-15 16:24:01 +02:00
Kawe Mazidjatari
6f441292d0 CModule construction optimization
Moved construction logic to separate method, and call that from constructor instead. When willing to change the entire context on the same object, you can now just call 'InitFromXXXX()'. Previously, a whole new object would be generated and copied into ours, and then deleted again.
2023-07-10 13:54:00 +02:00
Kawe Mazidjatari
b76f4aa3bd CModule class improvements
*Use unordered_map to get mpdule sections instead, as this is more performant than comparing strings.
* Removed 'm_SectionName' field from ModuleSections_t, as the unordered map now keeps track of them.
* Removed all extraneous module section copies.
* Renamed 'GetImportedFunction' to 'GetImportedSymbol'.
* Renamed 'GetExportedFunction' to 'GetExportedSymbol'.
*Made a static version of 'GetImportedSymbol' and 'GetExportedSymbol', so it could be used on raw module base addresses.
*Created inlines for getting the DOS and NT headers.
*Improved formatting so the code could be read more easily on a vertical monitor.
2023-06-25 10:29:42 +02:00
Kawe Mazidjatari
975c40876a CModule and CMemory class improvements
This commit significantly reduces output code size, and a noticeable increase in performance. Changes are:
- Removed all extraneous std::string and std::vector copy constructions; use raw pointers instead to boost performance.
- Marked simple getters in CModule inline.
- Marked several functions in CModule const.
- Slightly reordered CModule class.
- 'CMemory::CheckOpCodes' and 'CMemory::Patch' now take a const reference.
2023-06-12 18:40:16 +02:00
rexx
f310497464 fetch correct sdk module from pluginsdk 2023-05-08 19:28:16 +01:00
rexx
c29324b5dc rewrite PluginSystem_Init to use source filesystem 2023-05-08 19:12:52 +01:00
Kawe Mazidjatari
0f660aee8b Construct 'fs::path' only once 2023-04-30 12:13:20 +02:00
O-Robotic
a54e1df06a Fix plugin directory creation 2023-04-27 20:34:05 +01:00
rexx
3eb660c9f7 enable pluginsystem 2023-04-23 22:28:16 +01:00
Kawe Mazidjatari
cdb03a5d97 Use standalone filesystem functions instead
The member variants do not exist in experimental filesystem implementations.
2023-03-20 00:19:17 +01:00
Marvin D
61383efb50 Comment to plugin system for a bug that needs fixing. 2022-12-25 14:49:24 +01:00
Marvin D
b13c542ed1 CPluginCallbackList impl
* CPluginSystem allows for function callbacks now.
2022-12-12 17:16:39 +01:00
Kawe Mazidjatari
85d0d5fa9a Load plugins from 'bin/x64_retail/plugins' 2022-11-08 21:17:40 +01:00
Marvin D
10b87b3bbc PluginSDK init and PluginSystem improvements
* Plugins can be loaded now (commented)
2022-08-21 00:59:55 +02:00
Marvin D
c37d7a6b0c remove versioning, will be handled by factory. 2022-08-20 12:45:14 +02:00
Marvin D
60b2db9eaa create abstract class for PluginSystem, refactor Factory System 2022-08-20 12:42:19 +02:00
Marvin D
cebc6a13b6 Merge PluginSystem_Reload and PluginSystem_Init together 2022-08-20 11:42:22 +02:00
Marvin D
0a8a463245 PluginSystem_Reload logic 2022-08-20 11:28:28 +02:00
Marvin D
55a620aa4d CPluginSystem init, for native mods.
* Not finished yet.
* Need to make a proper ModuleManager
* Handle PluginSystem_Reload()
2022-08-20 01:59:36 +02:00