Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WINTERMUTE: Move plugins and externals to separate folder + one more stub #2223

Merged
merged 4 commits into from May 5, 2020

Conversation

@lolbot-iichan
Copy link
Contributor

lolbot-iichan commented May 4, 2020

Original Wintermute Engine 1.x supports 2 types of extentions:

  1. Importing external functions from DLLs, calling them from game script. This way DLLs like kernel32.dll and system32.dll can be used. See https://wiki.scummvm.org/index.php?title=Wintermute/Externals for details
  2. Implementing additional functionality as WME object, created at game script with operator "new". Those objects should be exported by DLLs named "wme_%s.dll". See https://wiki.scummvm.org/index.php?title=Wintermute/Plugins for details.

Most known extentions were reimplemented at ScummVM in previous PRs, but they were hardcoded deeply into /base/ folder files. This PR moves them all to a separate /ext/ folder.

Also, a stub for "wme_3fstatistics.dll" is implemented to remove on-screen script error messages during playing 3f Interactive games (the Reversion trilogy).

@sev-
sev- approved these changes May 4, 2020
Copy link
Member

sev- left a comment

This is great change, improves maintainability. I looked through the changes and have only one question about #if 1. Once that is clarified, this could be merged.

@@ -3413,6 +3394,12 @@ bool BaseGame::externalCall(ScScript *script, ScStack *stack, ScStack *thisStack
}
#endif

#if 1

This comment has been minimized.

Copy link
@sev-

sev- May 4, 2020

Member

Is this #if a leftover?

This comment has been minimized.

Copy link
@lolbot-iichan

lolbot-iichan May 4, 2020

Author Contributor

It marks the block that should be removed to disable plugins. Similar #if 1 marks enabling/disabling externals.

I thought of something similar to #ifdef ENABLE_FOXTAIL and #ifdef ENABLE_HEROCRAFT, so that build configuration can be switched between a vanilla engine for guys like https://jennibee.itch.io/dreamcat and extended engine for ScummVM and ResidualVM. However, I don't think that additional subengine is a good metaphor for this (since those extentions are from a pack of completely different games actually).

What do you think I should do with those?

This comment has been minimized.

Copy link
@sev-

sev- May 5, 2020

Member

I see a little benefit in disabling plugins in general or striving for "vanilla" engine. The game-specific changes are well-contained, and even if they change the engine behaviour, they are guarded by checks, that is normal.

We implement subengines only when there are substantial code additions or different hardware requirements such as a bigger screen. This is not applicable to WM because it is a high-end engine anyway.

So, either remove those ifs or put a comment above them.

This comment has been minimized.

Copy link
@lolbot-iichan

lolbot-iichan May 5, 2020

Author Contributor

That sounds reasonalble. Removed those #if at 899c569

@sev-
Copy link
Member

sev- commented May 5, 2020

Great, thank you! BTW, maybe you would like to join the team and commit your changes directly?

@sev- sev- merged commit 7b2e3fb into scummvm:master May 5, 2020
1 of 2 checks passed
1 of 2 checks passed
Codacy/PR Quality Review Not up to standards. This pull request quality could be better.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.