All available plugins will be loaded automatically by Hollywood upon startup. However, not all
plugins will be initialized automatically. Some plugin types will only be initialized
if the user explicitly calls
@REQUIRE on them. The reason for this is simple: Some
plugin types can completely replace core components of Hollywood like the inbuilt display or audio
driver. It would not make any sense to activate these plugins automatically upon startup because
it could happen then that several plugins try to replace the same core component and it would also make it
impossible to revert to Hollywood's inbuilt drivers. That's the reason why certain plugin types are
only initialized if explicitly demanded by the user by calling
@REQUIRE on them. Other
plugin types, however, like loaders and savers for additional file formats are normally initialized automatically
so that they are immediately available to all Hollywood applications right after their installation.
Starting with Hollywood 6.0 it is possible to prevent automatic initialization of image, animation,
sound, and video loader plugins using extension flags.
If you want to write a plugin that requires manual initialization, you need to set the
capability flag in your InitPlugin() implementation. Hollywood will then call your plugin
whenever the user runs the
@REQUIRE preprocessor command on your plugin. You will then be able to
perform all necessary initialization in your implementation of the RequirePlugin() call.
Here's a brief overview which plugin types are automatically initialized and which plugin types have to be manually initialized from your RequirePlugin() function:
HWEXT_LIBRARY_NOAUTOINIT extension bit.
HWEXT_IMAGE_NOAUTOINIT extension bit.
HWEXT_ANIM_NOAUTOINIT extension bit.
HWEXT_SOUND_NOAUTOINIT extension bit.
SetVectorEngine() manually to make Hollywood's vectorgraphics
library use the plugin.
HWEXT_VIDEO_NOAUTOINIT extension bit.
HWEXT_ICON_NOAUTOINIT extension bit.
HWEXT_FONT_NOAUTOINIT extension bit.
You will normally call the functions listed above in your RequirePlugin() implementation. See RequirePlugin for details.
Some plugin types only support the initialization of a single plugin, e.g. it is not possible to have multiple display adapter plugins running. Only a single display adapter can be active at a time. Thus, only the first call to hw_SetDisplayAdapter() will succeed. All other attempts to install another display adapter will fail once a plugin has installed a custom display adapter.