From f7b2ff4c5035776ecf95c3c654fd2c44ff9136da Mon Sep 17 00:00:00 2001 From: Sydney Biscuit Date: Sun, 18 Aug 2019 15:23:38 -0700 Subject: [PATCH] rename `scalar deleting destructor` to destroy --- Classes/TComponentGroup/TComponentGroup.cpp | 53 ++++++++++++++++++- Classes/TEdgeManager/TEdgeManager.cpp | 2 +- Classes/TEdgeManager/TEdgeManager.h | 2 +- Classes/TOneWay/TOneWay.cpp | 2 +- Classes/TOneWay/TOneWay.h | 2 +- .../TPinballComponent/TPinballComponent.cpp | 4 +- Classes/TTableLayer/TTableLayer.cpp | 4 +- Classes/TTableLayer/TTableLayer.h | 2 +- Classes/TTextBox/TTextBox.cpp | 12 ++--- Classes/TTextBox/TTextbox.h | 2 +- Classes/TTextBoxMessage/TTextBoxMessage.cpp | 2 +- Classes/TTextBoxMessage/TTextBoxMessage.h | 2 +- Classes/TZmapList/TZmapList.cpp | 2 +- Classes/TZmapList/TZmaplist.h | 2 +- 14 files changed, 72 insertions(+), 21 deletions(-) diff --git a/Classes/TComponentGroup/TComponentGroup.cpp b/Classes/TComponentGroup/TComponentGroup.cpp index db2fd33..742811d 100644 --- a/Classes/TComponentGroup/TComponentGroup.cpp +++ b/Classes/TComponentGroup/TComponentGroup.cpp @@ -46,7 +46,7 @@ return 0; } //----- (0101AA81) -------------------------------------------------------- -TComponentGroup *__thiscall TComponentGroup::`scalar deleting destructor`(TComponentGroup *this, char a2) +TComponentGroup *__thiscall TComponentGroup::destroy(TComponentGroup *this, char a2) { TComponentGroup *v2; // esi @@ -56,3 +56,54 @@ if ( a2 & 1 ) operator delete((void *)v2); return v2; } + +//----- (01018FFD) -------------------------------------------------------- +TComponentGroup* __thiscall TComponentGroup::TComponentGroup(TComponentGroup* this, struct TPinballTable* a2, int a3) +{ + TComponentGroup* v3; // esi + int v4; // eax + signed __int16* i; // edi + struct TPinballComponent* v6; // eax + int v8; // [esp+Ch] [ebp-4h] + int v9; // [esp+1Ch] [ebp+Ch] + + v3 = this; + TPinballComponent::TPinballComponent(this, a2, a3, 0); + *(_DWORD*)v3 = &TComponentGroup::vftable; + objlist_class::objlist_class((TComponentGroup*)((char*)v3 + 42), 4, 4); + *(_DWORD*)((char*)v3 + 50) = 0; + if (a3 > 0) + { + v4 = loader_query_iattribute(a3, 1027, &v8); + v9 = 0; + for (i = (signed __int16*)v4; v9 < v8; ++i) + { + v6 = TPinballTable::find_component(a2, *i); + if (v6) + objlist_class::Add((TComponentGroup*)((char*)v3 + 42), (void*)v6); + ++v9; + } + } + return v3; +} +// 10024D8: using guessed type void *TComponentGroup::vftable; + +//----- (01019082) -------------------------------------------------------- +TZmapList* __thiscall TComponentGroup::~TComponentGroup(TComponentGroup* this) +{ + TComponentGroup* v1; // esi + int v2; // eax + + v1 = this; + v2 = *(_DWORD*)((char*)this + 50); + *(_DWORD*)this = &TComponentGroup::vftable; + if (v2) + { + timer_kill(v2); + *(_DWORD*)((char*)v1 + 50) = 0; + } + objlist_destroy(*(_DWORD*)((char*)v1 + 46)); + return TPinballComponent::~TPinballComponent(v1); +} +// 10024D8: using guessed type void *TComponentGroup::vftable; + diff --git a/Classes/TEdgeManager/TEdgeManager.cpp b/Classes/TEdgeManager/TEdgeManager.cpp index 683421f..551663d 100644 --- a/Classes/TEdgeManager/TEdgeManager.cpp +++ b/Classes/TEdgeManager/TEdgeManager.cpp @@ -529,7 +529,7 @@ return v6; } //----- (01017441) -------------------------------------------------------- -TEdgeManager *__thiscall TEdgeManager::`scalar deleting destructor`(TEdgeManager *this, char a2) +TEdgeManager *__thiscall TEdgeManager::destroy(TEdgeManager *this, char a2) { TEdgeManager *v2; // esi diff --git a/Classes/TEdgeManager/TEdgeManager.h b/Classes/TEdgeManager/TEdgeManager.h index 41d6f20..e130dfe 100644 --- a/Classes/TEdgeManager/TEdgeManager.h +++ b/Classes/TEdgeManager/TEdgeManager.h @@ -21,6 +21,6 @@ TEdgeManager* __thiscall TEdgeManager::TEdgeManager(TEdgeManager* this, float a2 void __thiscall TEdgeManager::add_edge_to_box(TEdgeManager* this, int, int, struct TEdgeSegment*); // idb void __thiscall TEdgeManager::add_field_to_box(TEdgeManager* this, int, int, struct field_effect_type*); // idb TEdgeBox* __thiscall TEdgeManager::~TEdgeManager(TEdgeManager* this); -TEdgeManager* __thiscall TEdgeManager::`scalar deleting destructor`(TEdgeManager* this, char a2); +TEdgeManager* __thiscall TEdgeManager::destroy(TEdgeManager* this, char a2); #endif //PINBALL_TEDGEMANAGER_H diff --git a/Classes/TOneWay/TOneWay.cpp b/Classes/TOneWay/TOneWay.cpp index d270a58..47edbe0 100644 --- a/Classes/TOneWay/TOneWay.cpp +++ b/Classes/TOneWay/TOneWay.cpp @@ -119,7 +119,7 @@ return v4; // 1002530: using guessed type void *TOneway::vftable; //----- (0101AAA7) -------------------------------------------------------- -TOneway *__thiscall TOneway::`scalar deleting destructor`(TOneway *this, char a2) +TOneway *__thiscall TOneway::destroy(TOneway *this, char a2) { TOneway *v2; // esi diff --git a/Classes/TOneWay/TOneWay.h b/Classes/TOneWay/TOneWay.h index 11b0e53..1dc3142 100644 --- a/Classes/TOneWay/TOneWay.h +++ b/Classes/TOneWay/TOneWay.h @@ -14,7 +14,7 @@ int __thiscall TOneway::get_scoring(TOneway* this, int); // idb void __thiscall TOneway::put_scoring(TOneway* this, int, int); // idb void __thiscall TOneway::Collision(TOneway* this, struct TBall*, struct vector_type*, struct vector_type*, float, struct TEdgeSegment*); // idb TOneway* __thiscall TOneway::TOneway(TOneway* this, struct TPinballTable* a2, int a3); -TOneway* __thiscall TOneway::`scalar deleting destructor`(TOneway* this, char a2); +TOneway* __thiscall TOneway::destroy(TOneway* this, char a2); void* TOneway::vftable = &TPinballComponent::Message; // weak diff --git a/Classes/TPinballComponent/TPinballComponent.cpp b/Classes/TPinballComponent/TPinballComponent.cpp index 97a426a..9f51139 100644 --- a/Classes/TPinballComponent/TPinballComponent.cpp +++ b/Classes/TPinballComponent/TPinballComponent.cpp @@ -154,10 +154,10 @@ TZmapList* __thiscall TPinballComponent::~TPinballComponent(TPinballComponent* t result = (TZmapList*)objlist_delete_object(*(_DWORD*)((char*)result + 254), (int)this); v3 = *(TZmapList * *)((char*)v1 + 34); if (v3) - result = TZmapList::`scalar deleting destructor`(v3, 1); + result = TZmapList::destroy(v3, 1); v4 = *(TZmapList * *)((char*)v1 + 38); if (v4) - result = TZmapList::`scalar deleting destructor`(v4, 1); + result = TZmapList::destroy(v4, 1); return result; } // 10024A8: using guessed type void *TPinballComponent::vftable; diff --git a/Classes/TTableLayer/TTableLayer.cpp b/Classes/TTableLayer/TTableLayer.cpp index c271e80..69d4524 100644 --- a/Classes/TTableLayer/TTableLayer.cpp +++ b/Classes/TTableLayer/TTableLayer.cpp @@ -240,13 +240,13 @@ TCollisionComponent *v1; // esi v1 = this; *(_DWORD *)this = &TTableLayer::vftable; if ( edge_manager ) -TEdgeManager::`scalar deleting destructor`(edge_manager, 1); +TEdgeManager::destroy(edge_manager, 1); return TCollisionComponent::~TCollisionComponent(v1); } // 100276C: using guessed type void *TTableLayer::vftable; //----- (0101AACD) -------------------------------------------------------- -TTableLayer *__thiscall TTableLayer::`scalar deleting destructor`(TTableLayer *this, char a2) +TTableLayer *__thiscall TTableLayer::destroy(TTableLayer *this, char a2) { TTableLayer *v2; // esi diff --git a/Classes/TTableLayer/TTableLayer.h b/Classes/TTableLayer/TTableLayer.h index 87bc328..bfbcf18 100644 --- a/Classes/TTableLayer/TTableLayer.h +++ b/Classes/TTableLayer/TTableLayer.h @@ -13,7 +13,7 @@ struct TTableLayer; int __thiscall TTableLayer::FieldEffect(TTableLayer* this, struct TBall*, struct vector_type*); // idb TTableLayer* __thiscall TTableLayer::TTableLayer(TTableLayer* this, struct TPinballTable* a2); TZmapList* __thiscall TTableLayer::~TTableLayer(TTableLayer* this); -TTableLayer* __thiscall TTableLayer::`scalar deleting destructor`(TTableLayer* this, char a2); +TTableLayer* __thiscall TTableLayer::destroy(TTableLayer* this, char a2); void* TTableLayer::vftable = &TPinballComponent::Message; // weak diff --git a/Classes/TTextBox/TTextBox.cpp b/Classes/TTextBox/TTextBox.cpp index f2c8bba..995cb81 100644 --- a/Classes/TTextBox/TTextBox.cpp +++ b/Classes/TTextBox/TTextBox.cpp @@ -91,7 +91,7 @@ while ( *(_DWORD *)((char *)v2 + 70) ) v5 = *(TTextBoxMessage **)((char *)v2 + 70); v6 = *(_DWORD *)v5; if ( v5 ) -TTextBoxMessage::`scalar deleting destructor`(v5, 1); +TTextBoxMessage::destroy(v5, 1); *(_DWORD *)((char *)v2 + 70) = v6; } } @@ -107,7 +107,7 @@ v3 = *(TTextBoxMessage **)((char *)a3 + 70); if ( v3 ) { v4 = *(_DWORD *)v3; -TTextBoxMessage::`scalar deleting destructor`(v3, 1); +TTextBoxMessage::destroy(v3, 1); *(_DWORD *)((char *)a3 + 70) = v4; TTextBox::Draw(a3, a1); control_handler(60, a3); @@ -138,7 +138,7 @@ do v3 = *(TTextBoxMessage **)((char *)v1 + 70); v4 = *(_DWORD *)v3; if ( v3 ) -TTextBoxMessage::`scalar deleting destructor`(v3, 1); +TTextBoxMessage::destroy(v3, 1); *(_DWORD *)((char *)v1 + 70) = v4; } while ( v4 ); @@ -305,7 +305,7 @@ goto LABEL_18; v5 = *(_DWORD *)v4; } if ( v4 ) -TTextBoxMessage::`scalar deleting destructor`((TTextBoxMessage *)v4, 1); +TTextBoxMessage::destroy((TTextBoxMessage *)v4, 1); *(_DWORD *)((char *)v2 + 70) = v5; } gdrv_blit( @@ -358,7 +358,7 @@ TTextBox::Draw(v4, a2); } else { -TTextBoxMessage::`scalar deleting destructor`(v10, 1); +TTextBoxMessage::destroy(v10, 1); } } } @@ -380,7 +380,7 @@ else } //----- (010145CF) -------------------------------------------------------- -TTextBox *__thiscall TTextBox::`scalar deleting destructor`(TTextBox *this, char a2) +TTextBox *__thiscall TTextBox::destroy(TTextBox *this, char a2) { TTextBox *v2; // esi diff --git a/Classes/TTextBox/TTextbox.h b/Classes/TTextBox/TTextbox.h index d86cd64..409fee1 100644 --- a/Classes/TTextBox/TTextbox.h +++ b/Classes/TTextBox/TTextbox.h @@ -16,7 +16,7 @@ TTextBox* __thiscall TTextBox::TTextBox(TTextBox* this, struct TPinballTable* a2 TZmapList* __thiscall TTextBox::~TTextBox(TTextBox* this); // void __usercall TTextBox::Draw(TTextBox *this@, int a2@); // void __userpurge TTextBox::Display(TTextBox *this@, int a2@, char *a3, float a4); -TTextBox* __thiscall TTextBox::`scalar deleting destructor`(TTextBox *this, char a2); +TTextBox* __thiscall TTextBox::destroy(TTextBox *this, char a2); int __stdcall TTextBox::Message(int a2, float a3); void* TTextBox::vftable = &TTextBox::Message; // weak diff --git a/Classes/TTextBoxMessage/TTextBoxMessage.cpp b/Classes/TTextBoxMessage/TTextBoxMessage.cpp index 1765ec9..6f7b116 100644 --- a/Classes/TTextBoxMessage/TTextBoxMessage.cpp +++ b/Classes/TTextBoxMessage/TTextBoxMessage.cpp @@ -37,7 +37,7 @@ void __thiscall TTextBoxMessage::Refresh(TTextBoxMessage *this, float a2) // 1024F84: using guessed type int time_ticks; //----- (01014115) -------------------------------------------------------- -TTextBoxMessage *__thiscall TTextBoxMessage::`scalar deleting destructor`(TTextBoxMessage *this, char a2) +TTextBoxMessage *__thiscall TTextBoxMessage::destroy(TTextBoxMessage *this, char a2) { TTextBoxMessage *v2; // esi diff --git a/Classes/TTextBoxMessage/TTextBoxMessage.h b/Classes/TTextBoxMessage/TTextBoxMessage.h index d6f38d9..0b98d63 100644 --- a/Classes/TTextBoxMessage/TTextBoxMessage.h +++ b/Classes/TTextBoxMessage/TTextBoxMessage.h @@ -13,7 +13,7 @@ struct TTextBoxMessage; TTextBoxMessage* __thiscall TTextBoxMessage::TTextBoxMessage(TTextBoxMessage* this, char* a2, float a3); double __thiscall TTextBoxMessage::TimeLeft(TTextBoxMessage* this); void __thiscall TTextBoxMessage::Refresh(TTextBoxMessage* this, float); // idb -TTextBoxMessage* __thiscall TTextBoxMessage::`scalar deleting destructor`(TTextBoxMessage* this, char a2); +TTextBoxMessage* __thiscall TTextBoxMessage::destroy(TTextBoxMessage* this, char a2); #endif //PINBALL_TTEXTBOXMESSAGE_H diff --git a/Classes/TZmapList/TZmapList.cpp b/Classes/TZmapList/TZmapList.cpp index 19d1cfb..46d672b 100644 --- a/Classes/TZmapList/TZmapList.cpp +++ b/Classes/TZmapList/TZmapList.cpp @@ -10,7 +10,7 @@ objlist_class::objlist_class(this, a2, a3); return v3; } //----- (01017E5C) -------------------------------------------------------- -TZmapList *__thiscall TZmapList::`scalar deleting destructor`(TZmapList *this, char a2) +TZmapList *__thiscall TZmapList::destroy(TZmapList *this, char a2) { TZmapList *v2; // esi diff --git a/Classes/TZmapList/TZmaplist.h b/Classes/TZmapList/TZmaplist.h index 47c58bd..73990f2 100644 --- a/Classes/TZmapList/TZmaplist.h +++ b/Classes/TZmapList/TZmaplist.h @@ -10,7 +10,7 @@ /* 126 */ struct TZmapList; -TZmapList* __thiscall TZmapList::`scalar deleting destructor`(TZmapList* this, char a2); +TZmapList* __thiscall TZmapList::destroy(TZmapList* this, char a2); TZmapList* __thiscall TZmapList::TZmapList(TZmapList* this, int a2, int a3); #endif //PINBALL_TZMAPLIST_H