Changes

Jump to navigation Jump to search
m
→‎Late binding: Renaming GetClassInfo to MwGetClassInfo
Line 463: Line 463:  
Performing late binding in ManiaPlanet requires three objects:
 
Performing late binding in ManiaPlanet requires three objects:
 
* A CMwNod: the object on which you want to perform the action.
 
* A CMwNod: the object on which you want to perform the action.
* A CMwMemberInfo: the object that describes the member you want to access. This can be retrieved by getting the CMwNod's CMwClassInfo (pNod->GetClassInfo()) and looping over the class's members until you find the one with the name you are looking for.
+
* A CMwMemberInfo: the object that describes the member you want to access. This can be retrieved by getting the CMwNod's CMwClassInfo (pNod->MwGetClassInfo()) and looping over the class's members until you find the one with the name you are looking for.
 
* A CMwStack: wraps the CMwMemberInfo. In addition, when calling a method, this contains any method arguments.
 
* A CMwStack: wraps the CMwMemberInfo. In addition, when calling a method, this contains any method arguments.
   Line 480: Line 480:  
  List < class CPlugSolid* >& CFuncClouds::GetSolidFids () const
 
  List < class CPlugSolid* >& CFuncClouds::GetSolidFids () const
 
  {
 
  {
     static CMwMemberInfo* pMemberInfo = GetClassInfo ()->GetMemberInfo ( "SolidFids" );
+
     static CMwMemberInfo* pMemberInfo = MwGetClassInfo ()->GetMemberInfo ( "SolidFids" );
 
     struct
 
     struct
 
     {
 
     {
Line 501: Line 501:  
  void CFuncClouds::SetSolidFids ( List < class CPlugSolid* >& value )
 
  void CFuncClouds::SetSolidFids ( List < class CPlugSolid* >& value )
 
  {
 
  {
     static CMwMemberInfo* pMemberInfo = GetClassInfo ()->GetMemberInfo ( "SolidFids" );
+
     static CMwMemberInfo* pMemberInfo = MwGetClassInfo ()->GetMemberInfo ( "SolidFids" );
 
     CMwStack stack;
 
     CMwStack stack;
 
     stack.Push ( pMemberInfo );
 
     stack.Push ( pMemberInfo );
Line 518: Line 518:  
  uint CGameCtnEditorPluginScriptHandler::CanPlaceBlock ( class CGameCtnBlockInfo* pBlockModel, int3 coord, uint dir )
 
  uint CGameCtnEditorPluginScriptHandler::CanPlaceBlock ( class CGameCtnBlockInfo* pBlockModel, int3 coord, uint dir )
 
  {
 
  {
     static CMwMemberInfo* pMemberInfo = GetClassInfo ()->GetMemberInfo ( "CanPlaceBlock" );
+
     static CMwMemberInfo* pMemberInfo = MwGetClassInfo ()->GetMemberInfo ( "CanPlaceBlock" );
 
     uint uiVariantIndex;
 
     uint uiVariantIndex;
 
     CMwStack stack;
 
     CMwStack stack;
Line 541: Line 541:  
         ITEM_OBJECT    = 0x10000002,  // CMwNod*
 
         ITEM_OBJECT    = 0x10000002,  // CMwNod*
 
         ITEM_ENUM      = 0x10000003,
 
         ITEM_ENUM      = 0x10000003,
         ITEM_ISO4      = 0x10000004,   // Iso4*
+
         ITEM_ISO4      = 0x10000004,
 
         ITEM_VEC2      = 0x10000005,
 
         ITEM_VEC2      = 0x10000005,
 
         ITEM_VEC3      = 0x10000006,
 
         ITEM_VEC3      = 0x10000006,

Navigation menu