diff --git a/engines/ags/plugins/ags_controller/ags_controller.cpp b/engines/ags/plugins/ags_controller/ags_controller.cpp index 29f53d6c4c83..e7dd59201cda 100644 --- a/engines/ags/plugins/ags_controller/ags_controller.cpp +++ b/engines/ags/plugins/ags_controller/ags_controller.cpp @@ -28,25 +28,6 @@ namespace AGS3 { namespace Plugins { namespace AGSController { -struct Controller : public IAGSScriptManagedObject { -public: - - int Dispose(void *address, bool force) override { - return true; - } - - const char *GetType() override { - return "Controller"; - }; - - int Serialize(void *address, char *buffer, int bufsize) override { - return 0; - } -}; - -Controller ctrlInterface; -ConReader ctrlReader; - const char *AGSController::AGS_GetPluginName() { return "AGSController"; } diff --git a/engines/ags/plugins/ags_controller/ags_controller.h b/engines/ags/plugins/ags_controller/ags_controller.h index 689ff8c88890..b05f0ad5d459 100644 --- a/engines/ags/plugins/ags_controller/ags_controller.h +++ b/engines/ags/plugins/ags_controller/ags_controller.h @@ -33,6 +33,22 @@ class ConReader : public IAGSManagedObjectReader { virtual void Unserialize(int key, const char *serializedData, int dataSize); }; +struct Controller : public IAGSScriptManagedObject { +public: + + int Dispose(void *address, bool force) override { + return true; + } + + const char *GetType() override { + return "Controller"; + }; + + int Serialize(void *address, char *buffer, int bufsize) override { + return 0; + } +}; + class AGSController : public PluginBase { SCRIPT_HASH(AGSController) protected: @@ -58,6 +74,9 @@ class AGSController : public PluginBase { const char *AGS_GetPluginName() override; void AGS_EngineStartup(IAGSEngine *engine) override; int64 AGS_EngineOnEvent(int event, NumberPtr data) override; + + Controller ctrlInterface; + ConReader ctrlReader; }; } // namespace AGSController