ericoporto / agsjoy

[reverse engineered edition] Joystick for Adventure Game Studio in Linux. libagsjoy written by qptain_Nemo, for Linux, compatible with Wyz agsjoy.
MIT License
1 stars 1 forks source link

Pass enums, constants and other information for AGS Editor #4

Closed ericoporto closed 6 years ago

ericoporto commented 6 years ago

Use something like below to pass needed enumerators and constants to the AGS Editor using something like below for the Windows DLL.

const char* scriptHeader =
  "//------------------------;\r\n"
  "//add enum for ePOV here;\r\n"
  "//------------------------;\r\n"
  ;

int  AGS_EditorStartup(IAGSEditor* lpEditor)
{
  // User has checked the plugin to use it in their game

  // If it's an earlier version than what we need, abort.
  if (lpEditor->version < 1)
    return -1;

  editor = lpEditor;
  editor->RegisterScriptHeader(scriptHeader);

  // Return 0 to indicate success
  return 0;
}
ericoporto commented 6 years ago

Added some enum information in commit 262f01f , still need to verify if more is needed.