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

Improve cinterface #2366

Open
wants to merge 25 commits into
base: development
Choose a base branch
from

Conversation

lukaspj
Copy link
Contributor

@lukaspj lukaspj commented Aug 3, 2019

CInterface improvements

  • Expand EngineAPI type definitions (replaces WIP: Added some missing field info to the EngineApi interface #2241)
  • Fix name-clashing in script-exposed classes (these have not been an issue in TorqueScript because it doesn't fail, it just picks the first definition it finds).
  • Update the EngineAPI, a little bit of simplification over the changes made in New cinterface #2248
  • Improve the integration of the CInterface into existing systems
  • Expose SimPersistID to the EngineAPI
  • Improve EngineAPI export, less guess-work and compiler-dependency

Breaking changes

Name-clash fixes means that some members have been renamed, possibly breaking any scripts using these members.
AFX Members:

  • Method afxPhraseEffectData::addEffect -> pushEffect
  • Method afxMagicSpellData::addCastingEffect -> pushCastingEffect
  • Method afxMagicSpellData::addLaunchEffect -> pushLaunchEffect
  • Method afxMagicSpellData::addDeliveryEffect -> pushDeliveryEffect
  • Method afxMagicSpellData::addImpactEffect -> pushImpactEffect
  • Method afxEffectronData::addEffect -> pushEffect
  • Method afxEffectGroupData::addEffect -> pushEffect

Other Members:

  • Field GuiSpeedometerHud::mColor -> mNeedleColor (Maybe we could just use the parent class' mColor here instead?)
  • Callback TriggerComponent::onEnterViewCmd ->onEnterView
  • Callback TriggerComponent::onExitViewCmd ->onExitView
  • Callback TriggerComponent::onUpdateInViewCmd ->onUpdateInView
  • Callback TriggerComponent::onUpdateOutOfViewCmd ->onUpdateOutOfView
  • Field PostEffect::isEnabled -> enabled
  • Method GuiFilterCtrl::identity -> resetFiltering
  • Field SFXDescription::reverbModTime -> reverbModDepth (dunno if it pointed to time or depth before, now there is one for each)
  • Field GuiScriptNotifyCtrl::onChildAdded -> notifyOnChildAdded
  • Field GuiScriptNotifyCtrl::onChildRemoved -> notifyOnChildRemoved
  • Field GuiScriptNotifyCtrl::onChildResized -> notifyOnChildResized
  • Field GuiScriptNotifyCtrl::onParentResized -> notifyOnParentResized
  • Field GuiScriptNotifyCtrl::onResize -> notifyOnResize
  • Field GuiScriptNotifyCtrl::onLoseFirstResponder -> notifyOnLoseFirstResponder
  • Field GuiScriptNotifyCtrl::onGainFirstResponder -> notifyOnGainFirstResponder

Other (possibly breaking) changes

I also changed the default value of UndoManager::pushCompound from """" to "". Would like a review of whether this is valid or a misunderstanding on my part.

@lukaspj lukaspj marked this pull request as ready for review August 3, 2019 13:19
@lukaspj
Copy link
Contributor Author

lukaspj commented Oct 8, 2019

Since this is hard-to-test without actually using the C-Interface for something, this project might be useful:

https://github.com/lukaspj/T3D.Net-BaseGame

It has a pre-compiled version of this branch included already, and is set up with a SpectatorGameplay module written (mostly) in C#.

Edit:

Also Travis CI failed on clang on the last commit, but I do not believe this to be related to code, rather it seems to be an odd hiccup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant