diff --git a/Classes/Objlist/Objlist.cpp b/Classes/Objlist/Objlist.cpp index ca35d1a..d6b5d36 100644 --- a/Classes/Objlist/Objlist.cpp +++ b/Classes/Objlist/Objlist.cpp @@ -1,33 +1,82 @@ -// -// Created by neo on 2019-08-15. -// +#include "pinball.h" -#include "Objlist.h" - -//----- (010098D3) -------------------------------------------------------- -objlist_class *__thiscall objlist_class::objlist_class(objlist_class *this, int a2, int a3) +//----- (01012E51) -------------------------------------------------------- +int __stdcall objlist_add_object(_DWORD *a1, int a2) { -objlist_class *v3; // esi +int v2; // ecx -v3 = this; -*((_DWORD *)this + 1) = objlist_new(a2); -*(_DWORD *)v3 = a3; -return v3; +v2 = a1[1]; +if ( v2 >= *a1 ) +return 0; +a1[v2 + 2] = a2; +return ++a1[1]; } -//----- (010098F7) -------------------------------------------------------- -void __thiscall objlist_class::Grow(objlist_class *this) +//----- (01012E7A) -------------------------------------------------------- +signed int __stdcall objlist_delete_object(int a1, int a2) { - *((_DWORD *)this + 1) = objlist_grow(*((int **)this + 1), *(_DWORD *)this); +int v2; // edx +int v3; // ecx +_DWORD *v4; // esi + +v2 = *(_DWORD *)(a1 + 4); +v3 = v2 - 1; +if ( v2 - 1 < 0 ) +return 0; +v4 = (_DWORD *)(a1 + 4 * v3 + 8); +while ( *v4 != a2 ) +{ +--v3; +--v4; +if ( v3 < 0 ) +return 0; +} +*(_DWORD *)(a1 + 4 * v3 + 8) = *(_DWORD *)(a1 + 4 * v2 + 4); +--*(_DWORD *)(a1 + 4); +return 1; } -//----- (0100ACF3) -------------------------------------------------------- -void __thiscall objlist_class::Add(objlist_class *this, void *a2) +//----- (01012EBE) -------------------------------------------------------- +_DWORD *__stdcall objlist_new(int a1) { - objlist_class *v2; // esi +_DWORD *result; // eax - v2 = this; - if ( *(_DWORD *)(*((_DWORD *)this + 1) + 4) == **((_DWORD **)this + 1) ) - objlist_class::Grow(this); - objlist_add_object(*((_DWORD **)v2 + 1), (int)a2); +result = (_DWORD *)memoryallocate(4 * a1 + 12); +if ( result ) +{ +result[1] = 0; +*result = a1; +} +return result; +} + +//----- (01012EE8) -------------------------------------------------------- +int *__stdcall objlist_grow(int *a1, int a2) +{ +int *v2; // esi +int v3; // eax +int *v4; // eax + +v2 = a1; +if ( a1 ) +{ +v3 = a2 + a1[1]; +if ( v3 > *a1 ) +{ +v4 = (int *)memoryrealloc((int)a1, 4 * v3 + 12); +if ( v4 ) +{ +v2 = v4; +*v4 = a2 + v4[1]; +} +} +} +return v2; +} + +//----- (01013C6F) -------------------------------------------------------- +void __stdcall objlist_destroy(int a1) +{ +if ( a1 ) +memoryfree(a1); } diff --git a/Classes/Objlist/Objlist_Class.cpp b/Classes/Objlist/Objlist_Class.cpp new file mode 100644 index 0000000..ca35d1a --- /dev/null +++ b/Classes/Objlist/Objlist_Class.cpp @@ -0,0 +1,33 @@ +// +// Created by neo on 2019-08-15. +// + +#include "Objlist.h" + +//----- (010098D3) -------------------------------------------------------- +objlist_class *__thiscall objlist_class::objlist_class(objlist_class *this, int a2, int a3) +{ +objlist_class *v3; // esi + +v3 = this; +*((_DWORD *)this + 1) = objlist_new(a2); +*(_DWORD *)v3 = a3; +return v3; +} + +//----- (010098F7) -------------------------------------------------------- +void __thiscall objlist_class::Grow(objlist_class *this) +{ + *((_DWORD *)this + 1) = objlist_grow(*((int **)this + 1), *(_DWORD *)this); +} + +//----- (0100ACF3) -------------------------------------------------------- +void __thiscall objlist_class::Add(objlist_class *this, void *a2) +{ + objlist_class *v2; // esi + + v2 = this; + if ( *(_DWORD *)(*((_DWORD *)this + 1) + 4) == **((_DWORD **)this + 1) ) + objlist_class::Grow(this); + objlist_add_object(*((_DWORD **)v2 + 1), (int)a2); +} diff --git a/Classes/TBall/TBall.cpp b/Classes/TBall/TBall.cpp index f61d503..939cb99 100644 --- a/Classes/TBall/TBall.cpp +++ b/Classes/TBall/TBall.cpp @@ -144,7 +144,7 @@ struct TPinballTable *v17; // [esp+64h] [ebp+8h] v2 = this; TPinballComponent::TPinballComponent(this, a2, -1, 0); *(float *)((char *)v2 + 78) = 0.0; -*(_DWORD *)v2 = &TBall::`vftable`; +*(_DWORD *)v2 = &TBall::vftable; *(float *)((char *)v2 + 70) = 0.0; *((_BYTE *)v2 + 5) = 1; *(_DWORD *)((char *)v2 + 106) = 0; @@ -199,5 +199,5 @@ v11 = *(_DWORD *)((char *)v2 + 154); *(_DWORD *)((char *)v2 + 50) = *(_DWORD *)((char *)v2 + 154); return v2; } -// 1002554: using guessed type void *TBall::`vftable`; +// 1002554: using guessed type void *TBall::vftable; // 1008ED8: using guessed type double __stdcall proj_z_distance(_DWORD); diff --git a/Classes/TBall/TBall.h b/Classes/TBall/TBall.h index 22f5b93..a91d03b 100644 --- a/Classes/TBall/TBall.h +++ b/Classes/TBall/TBall.h @@ -16,6 +16,6 @@ int __thiscall TBall::Message(TBall* this, int, float); // idb void __thiscall TBall::Repaint(TBall* __hidden this); // idb TBall* __thiscall TBall::TBall(TBall* this, struct TPinballTable* a2); -void* TBall::`vftable` = &TBall::Message; // weak +void* TBall::vftable = &TBall::Message; // weak #endif //PINBALL_TBALL_H diff --git a/Classes/TBlocker/TBlocker.cpp b/Classes/TBlocker/TBlocker.cpp index 65936d4..26079c9 100644 --- a/Classes/TBlocker/TBlocker.cpp +++ b/Classes/TBlocker/TBlocker.cpp @@ -72,7 +72,7 @@ int v8; // [esp+44h] [ebp-Ch] v3 = this; TCollisionComponent::TCollisionComponent(this, a2, a3, 1); -*(_DWORD *)v3 = &TBlocker::`vftable`; +*(_DWORD *)v3 = &TBlocker::vftable; loader_query_visual(a3, 0, &v6); v4 = *(_DWORD **)((char *)v3 + 26); *(_DWORD *)((char *)v3 + 90) = v7; @@ -86,5 +86,5 @@ v4 = *(_DWORD **)((char *)v3 + 26); render_sprite_set_bitmap(v4, 0); return v3; } -// 10025DC: using guessed type void *TBlocker::`vftable`; +// 10025DC: using guessed type void *TBlocker::vftable; diff --git a/Classes/TBlocker/TBlocker.h b/Classes/TBlocker/TBlocker.h index 3fc7e0f..7acf800 100644 --- a/Classes/TBlocker/TBlocker.h +++ b/Classes/TBlocker/TBlocker.h @@ -14,6 +14,6 @@ void __stdcall TBlocker::TimerExpired(int, struct TPinballComponent*); // idb int __thiscall TBlocker::Message(TBlocker* this, int, float); // idb TBlocker* __thiscall TBlocker::TBlocker(TBlocker* this, struct TPinballTable* a2, int a3); -void* TBlocker::`vftable` = &TBlocker::Message; // weak +void* TBlocker::vftable = &TBlocker::Message; // weak #endif //PINBALL_TBLOCKER_H diff --git a/Classes/TBumper/TBumper.cpp b/Classes/TBumper/TBumper.cpp index b2ff915..af24f51 100644 --- a/Classes/TBumper/TBumper.cpp +++ b/Classes/TBumper/TBumper.cpp @@ -185,7 +185,7 @@ v3 = this; TCollisionComponent::TCollisionComponent(this, a2, a3, 1); *(_DWORD *)((char *)v3 + 78) = 0; *(_DWORD *)((char *)v3 + 82) = 0; -*(_DWORD *)v3 = &TBumper::`vftable`; +*(_DWORD *)v3 = &TBumper::vftable; *(_DWORD *)((char *)v3 + 86) = *(_DWORD *)loader_query_float_attribute(a3, 0, 407); loader_query_visual(a3, 0, &v5); *(_DWORD *)((char *)v3 + 94) = v6; @@ -193,4 +193,4 @@ loader_query_visual(a3, 0, &v5); *(_DWORD *)((char *)v3 + 90) = *(_DWORD *)((char *)v3 + 66); return v3; } -// 100256C: using guessed type void *TBumper::`vftable`; +// 100256C: using guessed type void *TBumper::vftable; diff --git a/Classes/TBumper/TBumper.h b/Classes/TBumper/TBumper.h index efed446..7c2a720 100644 --- a/Classes/TBumper/TBumper.h +++ b/Classes/TBumper/TBumper.h @@ -18,6 +18,6 @@ void __thiscall TBumper::put_scoring(TBumper* this, int, int); // idb void __thiscall TBumper::Collision(TBumper* this, struct TBall*, struct vector_type*, struct vector_type*, float, struct TEdgeSegment*); // idb TBumper* __thiscall TBumper::TBumper(TBumper* this, struct TPinballTable* a2, int a3); -void* TBumper::`vftable` = &TBumper::Message; // weak +void* TBumper::vftable = &TBumper::Message; // weak #endif //PINBALL_TBUMPER_H diff --git a/Classes/TCircle/TCircle.cpp b/Classes/TCircle/TCircle.cpp index 90f3907..541a27e 100644 --- a/Classes/TCircle/TCircle.cpp +++ b/Classes/TCircle/TCircle.cpp @@ -7,14 +7,14 @@ TCircle *v6; // ebx v6 = this; TEdgeSegment::TEdgeSegment(this, a2, a3, a4); -*(_DWORD *)v6 = &TCircle::`vftable`; +*(_DWORD *)v6 = &TCircle::vftable; *(float *)((char *)v6 + 33) = a6 * a6; *(_DWORD *)((char *)v6 + 21) = *(_DWORD *)a5; *(_DWORD *)((char *)v6 + 25) = *((_DWORD *)a5 + 1); *(_DWORD *)((char *)v6 + 29) = *((_DWORD *)a5 + 2); return v6; } -// 1002454: using guessed type void *TCircle::`vftable`; +// 1002454: using guessed type void *TCircle::vftable; //----- (010158D6) -------------------------------------------------------- double __thiscall TCircle::FindCollisionDistance(TCircle *this, struct ray_type *a2) diff --git a/Classes/TCircle/TCircle.h b/Classes/TCircle/TCircle.h index 14841bb..f3fc866 100644 --- a/Classes/TCircle/TCircle.h +++ b/Classes/TCircle/TCircle.h @@ -15,6 +15,6 @@ double __thiscall TCircle::FindCollisionDistance(TCircle* this, struct ray_type* void __thiscall TCircle::place_in_grid(TCircle* this); // idb void __thiscall TCircle::EdgeCollision(TCircle* this, struct TBall*, float); // idb -void* TCircle::`vftable` = &TCircle::EdgeCollision; // weak +void* TCircle::vftable = &TCircle::EdgeCollision; // weak #endif //PINBALL_TCIRCLE_H diff --git a/Classes/TCollisionComponent/TCollisionComponent.cpp b/Classes/TCollisionComponent/TCollisionComponent.cpp index b55734b..38f5f34 100644 --- a/Classes/TCollisionComponent/TCollisionComponent.cpp +++ b/Classes/TCollisionComponent/TCollisionComponent.cpp @@ -355,7 +355,7 @@ unsigned int v16; // [esp+48h] [ebp-14h] v4 = this; TPinballComponent::TPinballComponent(this, a2, a3, 1); -*(_DWORD *)v4 = &TCollisionComponent::`vftable`; +*(_DWORD *)v4 = &TCollisionComponent::vftable; objlist_class::objlist_class((TCollisionComponent *)((char *)v4 + 42), 4, 4); v5 = *(_DWORD *)((char *)v4 + 10) == 0; *((_BYTE *)v4 + 5) = 1; @@ -385,7 +385,7 @@ install_wall(v8, v4, (char *)v4 + 5, v7, v6, 0); *(_DWORD *)((char *)v4 + 22) = a3; return v4; } -// 10024EC: using guessed type void *TCollisionComponent::`vftable`; +// 10024EC: using guessed type void *TCollisionComponent::vftable; //----- (01019172) -------------------------------------------------------- TZmapList *__thiscall TCollisionComponent::~TCollisionComponent(TCollisionComponent *this) @@ -397,7 +397,7 @@ void *v4; // edi v1 = this; v2 = *(_DWORD *)((char *)this + 46); -*(_DWORD *)this = &TCollisionComponent::`vftable`; +*(_DWORD *)this = &TCollisionComponent::vftable; if ( *(_DWORD *)(v2 + 4) ) { do @@ -412,4 +412,4 @@ while ( *(_DWORD *)(*(_DWORD *)((char *)v1 + 46) + 4) ); objlist_destroy(*(_DWORD *)((char *)v1 + 46)); return TPinballComponent::~TPinballComponent(v1); } -// 10024EC: using guessed type void *TCollisionComponent::`vftable`; +// 10024EC: using guessed type void *TCollisionComponent::vftable; diff --git a/Classes/TCollisionComponent/TCollisionComponent.h b/Classes/TCollisionComponent/TCollisionComponent.h index db04530..21dfb54 100644 --- a/Classes/TCollisionComponent/TCollisionComponent.h +++ b/Classes/TCollisionComponent/TCollisionComponent.h @@ -15,6 +15,6 @@ int __thiscall TCollisionComponent::DefaultCollision(TCollisionComponent* this, TCollisionComponent* __thiscall TCollisionComponent::TCollisionComponent(TCollisionComponent* this, struct TPinballTable* a2, int a3, int a4); TZmapList* __thiscall TCollisionComponent::~TCollisionComponent(TCollisionComponent* this); -void* TCollisionComponent::`vftable` = &TPinballComponent::Message; // weak +void* TCollisionComponent::vftable = &TPinballComponent::Message; // weak #endif //PINBALL_TCOLLISIONCOMPONENT_H diff --git a/Classes/TComponentGroup/TComponentGroup.h b/Classes/TComponentGroup/TComponentGroup.h index f96cd9e..b9ab6cb 100644 --- a/Classes/TComponentGroup/TComponentGroup.h +++ b/Classes/TComponentGroup/TComponentGroup.h @@ -16,6 +16,6 @@ TComponentGroup* __thiscall TComponentGroup::TComponentGroup(TComponentGroup* th TZmapList* __thiscall TComponentGroup::~TComponentGroup(TComponentGroup* this); TComponentGroup* __thiscall TComponentGroup::`scalar deleting destructor`(TComponentGroup *this, char a2); -void* TComponentGroup::`vftable` = &TComponentGroup::Message; // weak +void* TComponentGroup::vftable = &TComponentGroup::Message; // weak #endif //PINBALL_TCOMPONENTGROUP_H diff --git a/Classes/TDemo/TDemo.cpp b/Classes/TDemo/TDemo.cpp index 5ea8e58..87eab20 100644 --- a/Classes/TDemo/TDemo.cpp +++ b/Classes/TDemo/TDemo.cpp @@ -214,7 +214,7 @@ unsigned int v12; // [esp+48h] [ebp-14h] v3 = this; TCollisionComponent::TCollisionComponent(this, a2, a3, 0); -*(_DWORD *)v3 = &TDemo::`vftable`; +*(_DWORD *)v3 = &TDemo::vftable; *(_DWORD *)((char *)v3 + 114) = 0; *(_DWORD *)((char *)v3 + 110) = 0; *(_DWORD *)((char *)v3 + 102) = 0; @@ -253,4 +253,4 @@ v9 = (float *)loader_query_float_attribute(a3, 0, 1404); *(_DWORD *)((char *)v3 + 126) = install_wall(v9, v3, (char *)v3 + 5, v12, *(float *)((char *)a2 + 282), (void *)0x57C); return v3; } -// 10026E8: using guessed type void *TDemo::`vftable`; +// 10026E8: using guessed type void *TDemo::vftable; diff --git a/Classes/TDemo/TDemo.h b/Classes/TDemo/TDemo.h index 0a87797..58ebf9c 100644 --- a/Classes/TDemo/TDemo.h +++ b/Classes/TDemo/TDemo.h @@ -20,6 +20,6 @@ void __thiscall TDemo::Collision(TDemo* this, struct TBall*, struct vector_type* int __thiscall TDemo::Message(TDemo* this, int, float); // idb TDemo* __thiscall TDemo::TDemo(TDemo* this, struct TPinballTable* a2, int a3); -void* TDemo::`vftable` = &TDemo::Message; // weak +void* TDemo::vftable = &TDemo::Message; // weak #endif //PINBALL_TDEMO_H diff --git a/Classes/TDrain/TDrain.cpp b/Classes/TDrain/TDrain.cpp index d41001d..f6e7e09 100644 --- a/Classes/TDrain/TDrain.cpp +++ b/Classes/TDrain/TDrain.cpp @@ -44,8 +44,8 @@ TDrain *v3; // esi v3 = this; TCollisionComponent::TCollisionComponent(this, a2, a3, 1); *(_DWORD *)((char *)v3 + 86) = 0; -*(_DWORD *)v3 = &TDrain::`vftable`; +*(_DWORD *)v3 = &TDrain::vftable; *(_DWORD *)((char *)v3 + 78) = *(_DWORD *)loader_query_float_attribute(a3, 0, 407); return v3; } -// 1002720: using guessed type void *TDrain::`vftable`; +// 1002720: using guessed type void *TDrain::vftable; diff --git a/Classes/TDrain/TDrain.h b/Classes/TDrain/TDrain.h index b2b52f9..6089baa 100644 --- a/Classes/TDrain/TDrain.h +++ b/Classes/TDrain/TDrain.h @@ -15,6 +15,6 @@ void __stdcall TDrain::TimerCallback(int, struct TPinballComponent*); // idb void __thiscall TDrain::Collision(TDrain* this, struct TBall*, struct vector_type*, struct vector_type*, float, struct TEdgeSegment*); // idb TDrain* __thiscall TDrain::TDrain(TDrain* this, struct TPinballTable* a2, int a3); -void* TDrain::`vftable` = &TDrain::Message; // weak +void* TDrain::vftable = &TDrain::Message; // weak #endif //PINBALL_TDRAIN_H diff --git a/Classes/TEdgeSegment/TEdgeSegment.cpp b/Classes/TEdgeSegment/TEdgeSegment.cpp index 0a60213..114835b 100644 --- a/Classes/TEdgeSegment/TEdgeSegment.cpp +++ b/Classes/TEdgeSegment/TEdgeSegment.cpp @@ -8,9 +8,9 @@ TEdgeSegment *result; // eax result = this; *((_DWORD *)this + 1) = a2; *((_DWORD *)this + 2) = a3; -*(_DWORD *)this = &TEdgeSegment::`vftable`; +*(_DWORD *)this = &TEdgeSegment::vftable; *(_DWORD *)((char *)this + 17) = a4; *((_BYTE *)this + 12) = 0; return result; } -// 1002444: using guessed type void *TEdgeSegment::`vftable`; +// 1002444: using guessed type void *TEdgeSegment::vftable; diff --git a/Classes/TEdgeSegment/TEdgeSegment.h b/Classes/TEdgeSegment/TEdgeSegment.h index b5c64ae..e38b59e 100644 --- a/Classes/TEdgeSegment/TEdgeSegment.h +++ b/Classes/TEdgeSegment/TEdgeSegment.h @@ -12,6 +12,6 @@ struct TEdgeSegment; TEdgeSegment* __thiscall TEdgeSegment::TEdgeSegment(TEdgeSegment* this, struct TCollisionComponent* a2, char* a3, unsigned int a4); -void* TEdgeSegment::`vftable` = &_purecall; // weak +void* TEdgeSegment::vftable = &_purecall; // weak #endif //PINBALL_TEDGESEGMENT_H diff --git a/Classes/TFlagSpinner/TFlagSpinner.cpp b/Classes/TFlagSpinner/TFlagSpinner.cpp index 914595b..1900a38 100644 --- a/Classes/TFlagSpinner/TFlagSpinner.cpp +++ b/Classes/TFlagSpinner/TFlagSpinner.cpp @@ -149,7 +149,7 @@ int v18; // [esp+64h] [ebp-8h] v3 = this; TCollisionComponent::TCollisionComponent(this, a2, a3, 0); -*(_DWORD *)v3 = &TFlagSpinner::`vftable`; +*(_DWORD *)v3 = &TFlagSpinner::vftable; *(_DWORD *)((char *)v3 + 102) = 0; loader_query_visual(a3, 0, &v12); v15 = *v13; @@ -191,4 +191,4 @@ if ( v10 ) *(_DWORD *)((char *)v3 + 86) = *v10; return v3; } -// 1002588: using guessed type void *TFlagSpinner::`vftable`; +// 1002588: using guessed type void *TFlagSpinner::vftable; diff --git a/Classes/TFlagSpinner/TFlagSpinner.h b/Classes/TFlagSpinner/TFlagSpinner.h index a378004..00bdca7 100644 --- a/Classes/TFlagSpinner/TFlagSpinner.h +++ b/Classes/TFlagSpinner/TFlagSpinner.h @@ -18,6 +18,6 @@ void __thiscall TFlagSpinner::put_scoring(TFlagSpinner* this, int, int); // idb void __thiscall TFlagSpinner::Collision(TFlagSpinner* this, struct TBall*, struct vector_type*, struct vector_type*, float, struct TEdgeSegment*); // idb TFlagSpinner* __thiscall TFlagSpinner::TFlagSpinner(TFlagSpinner* this, struct TPinballTable* a2, int a3); -void* TFlagSpinner::`vftable` = &TFlagSpinner::Message; // weak +void* TFlagSpinner::vftable = &TFlagSpinner::Message; // weak #endif //PINBALL_TFLAGSPINNER_H diff --git a/Classes/TFlipper/TFlipper.cpp b/Classes/TFlipper/TFlipper.cpp index 01d5ff4..f38d770 100644 --- a/Classes/TFlipper/TFlipper.cpp +++ b/Classes/TFlipper/TFlipper.cpp @@ -9,11 +9,11 @@ void *v2; // ST00_4 v1 = this; v2 = *(void **)((char *)this + 82); -*(_DWORD *)this = &TFlipper::`vftable`; +*(_DWORD *)this = &TFlipper::vftable; operator delete(v2); return TCollisionComponent::~TCollisionComponent(v1); } -// 1002838: using guessed type void *TFlipper::`vftable`; +// 1002838: using guessed type void *TFlipper::vftable; //----- (0101C070) -------------------------------------------------------- void __stdcall TFlipper::TimerExpired(int a1, void *a2) @@ -206,7 +206,7 @@ float *v25; // [esp+7Ch] [ebp+Ch] v3 = a3; v4 = this; TCollisionComponent::TCollisionComponent(this, a2, a3, 0); -*(_DWORD *)v4 = &TFlipper::`vftable`; +*(_DWORD *)v4 = &TFlipper::vftable; loader_query_visual(a3, 0, &v18); *(_DWORD *)((char *)v4 + 74) = v21; *(_DWORD *)((char *)v4 + 70) = v22; @@ -245,7 +245,7 @@ v16 = *(_DWORD *)((char *)v4 + 34); *(float *)((char *)v4 + 102) = 0.0; return v4; } -// 1002838: using guessed type void *TFlipper::`vftable`; +// 1002838: using guessed type void *TFlipper::vftable; //----- (0101C6D7) -------------------------------------------------------- TFlipper *__thiscall TFlipper::`vector deleting destructor`(TFlipper *this, char a2) diff --git a/Classes/TFlipper/TFlipper.h b/Classes/TFlipper/TFlipper.h index eaeb18c..5c712cc 100644 --- a/Classes/TFlipper/TFlipper.h +++ b/Classes/TFlipper/TFlipper.h @@ -17,6 +17,6 @@ void __thiscall TFlipper::port_draw(TFlipper* __hidden this); // idb TFlipper* __thiscall TFlipper::TFlipper(TFlipper* this, struct TPinballTable* a2, int a3); TFlipper* __thiscall TFlipper::`vector deleting destructor`(TFlipper *this, char a2); -void* TFlipper::`vftable` = &TFlipper::Message; // weak +void* TFlipper::vftable = &TFlipper::Message; // weak #endif //PINBALL_TFLIPPER_H diff --git a/Classes/TFlipperEdge/TFlipperEdge.cpp b/Classes/TFlipperEdge/TFlipperEdge.cpp index 888ba84..39836c4 100644 --- a/Classes/TFlipperEdge/TFlipperEdge.cpp +++ b/Classes/TFlipperEdge/TFlipperEdge.cpp @@ -758,7 +758,7 @@ v13 = this; TEdgeSegment::TEdgeSegment(this, a2, a3, a4); *(float *)((char *)v13 + 25) = a12; *(float *)((char *)v13 + 29) = a13; -*(_DWORD *)v13 = &TFlipperEdge::`vftable`; +*(_DWORD *)v13 = &TFlipperEdge::vftable; v46 = *(float *)a6; v47 = *((float *)a6 + 1); v48 = *((float *)a6 + 2); @@ -857,4 +857,4 @@ result = v13; *(float *)((char *)v13 + 209) = 0.0; return result; } -// 1002854: using guessed type void *TFlipperEdge::`vftable`; +// 1002854: using guessed type void *TFlipperEdge::vftable; diff --git a/Classes/TFlipperEdge/TFlipperEdge.h b/Classes/TFlipperEdge/TFlipperEdge.h index 7136b4f..4bccc4f 100644 --- a/Classes/TFlipperEdge/TFlipperEdge.h +++ b/Classes/TFlipperEdge/TFlipperEdge.h @@ -21,6 +21,6 @@ void __thiscall TFlipperEdge::SetMotion(TFlipperEdge* this, int, float); // idb void __thiscall TFlipperEdge::port_draw(TFlipperEdge* this); // idb TFlipperEdge* __thiscall TFlipperEdge::TFlipperEdge(TFlipperEdge* this, struct TCollisionComponent* a2, char* a3, unsigned int a4, struct TPinballTable* a5, struct vector_type* a6, struct vector_type* a7, struct vector_type* a8, float a9, float a10, float a11, float a12, float a13); -void* TFlipperEdge::`vftable` = &TFlipperEdge::EdgeCollision; // weak +void* TFlipperEdge::vftable = &TFlipperEdge::EdgeCollision; // weak #endif //PINBALL_TFLIPPEREDGE_H diff --git a/Classes/TGate/TGate.cpp b/Classes/TGate/TGate.cpp index c51816c..9aef649 100644 --- a/Classes/TGate/TGate.cpp +++ b/Classes/TGate/TGate.cpp @@ -41,7 +41,7 @@ int v8; // [esp+40h] [ebp-Ch] v3 = this; TCollisionComponent::TCollisionComponent(this, a2, a3, 1); -*(_DWORD *)v3 = &TGate::`vftable`; +*(_DWORD *)v3 = &TGate::vftable; loader_query_visual(a3, 0, &v6); *(_DWORD *)((char *)v3 + 78) = v7; *(_DWORD *)((char *)v3 + 82) = v8; @@ -51,4 +51,4 @@ render_sprite_set_bitmap(*(_DWORD **)((char *)v3 + 26), *(_DWORD *)(*(_DWORD *)( control_handler(1024, v3); return v3; } -// 10025F8: using guessed type void *TGate::`vftable`; +// 10025F8: using guessed type void *TGate::vftable; diff --git a/Classes/TGate/TGate.h b/Classes/TGate/TGate.h index ad0539b..5ec15b6 100644 --- a/Classes/TGate/TGate.h +++ b/Classes/TGate/TGate.h @@ -13,6 +13,6 @@ struct TGate; int __thiscall TGate::Message(TGate* this, int, float); // idb TGate* __thiscall TGate::TGate(TGate* this, struct TPinballTable* a2, int a3); -void* TGate::`vftable` = &TGate::Message; // weak +void* TGate::vftable = &TGate::Message; // weak #endif //PINBALL_TGATE_H diff --git a/Classes/THole/THole.cpp b/Classes/THole/THole.cpp index 465f4f8..0f6bc7a 100644 --- a/Classes/THole/THole.cpp +++ b/Classes/THole/THole.cpp @@ -141,7 +141,7 @@ TCircle *v22; // [esp+78h] [ebp+8h] v3 = this; TCollisionComponent::TCollisionComponent(this, a2, a3, 0); -*(_DWORD *)v3 = &THole::`vftable`; +*(_DWORD *)v3 = &THole::vftable; *(_DWORD *)((char *)v3 + 94) = 1028443341; *(_DWORD *)((char *)v3 + 6) = 0; *(_DWORD *)((char *)v3 + 86) = 0; @@ -193,4 +193,4 @@ v18 = *(_DWORD *)((char *)v3 + 122); edges_insert_circle((struct circle_type *)&v16, 0, (THole *)((char *)v3 + 130)); return v3; } -// 10026AC: using guessed type void *THole::`vftable`; +// 10026AC: using guessed type void *THole::vftable; diff --git a/Classes/THole/THole.h b/Classes/THole/THole.h index 0d89423..f8a9a37 100644 --- a/Classes/THole/THole.h +++ b/Classes/THole/THole.h @@ -16,6 +16,6 @@ int __thiscall THole::Message(THole* this, int, float); // idb void __thiscall THole::Collision(THole* this, struct TBall*, struct vector_type*, struct vector_type*, float, struct TEdgeSegment*); // idb THole* __thiscall THole::THole(THole* this, struct TPinballTable* a2, int a3); -void* THole::`vftable` = &THole::Message; // weak +void* THole::vftable = &THole::Message; // weak #endif //PINBALL_THOLE_H diff --git a/Classes/TKickback/TKickback.cpp b/Classes/TKickback/TKickback.cpp index 4d51500..47a7dbc 100644 --- a/Classes/TKickback/TKickback.cpp +++ b/Classes/TKickback/TKickback.cpp @@ -99,10 +99,10 @@ TCollisionComponent::TCollisionComponent(this, a2, a3, 1); *(_DWORD *)((char *)v3 + 6) = 0; *(_DWORD *)((char *)v3 + 86) = 0; *(_DWORD *)((char *)v3 + 90) = 0; -*(_DWORD *)v3 = &TKickback::`vftable`; +*(_DWORD *)v3 = &TKickback::vftable; *(_DWORD *)((char *)v3 + 78) = 1060320051; *(_DWORD *)((char *)v3 + 82) = 1036831949; *(_DWORD *)((char *)v3 + 66) = 1315859240; return v3; } -// 1002668: using guessed type void *TKickback::`vftable`; +// 1002668: using guessed type void *TKickback::vftable; diff --git a/Classes/TKickback/TKickback.h b/Classes/TKickback/TKickback.h index 09b6701..fbb891c 100644 --- a/Classes/TKickback/TKickback.h +++ b/Classes/TKickback/TKickback.h @@ -15,6 +15,6 @@ int __thiscall TKickback::Message(TKickback* this, int, float); // idb void __thiscall TKickback::Collision(TKickback* this, struct TBall*, struct vector_type*, struct vector_type*, float, struct TEdgeSegment*); // idb TKickback* __thiscall TKickback::TKickback(TKickback* this, struct TPinballTable* a2, int a3); -void* TKickback::`vftable` = &TKickback::Message; // weak +void* TKickback::vftable = &TKickback::Message; // weak #endif //PINBALL_TKICKBACK_H diff --git a/Classes/TKickout/TKickout.cpp b/Classes/TKickout/TKickout.cpp index 48d7d3b..f9c0447 100644 --- a/Classes/TKickout/TKickout.cpp +++ b/Classes/TKickout/TKickout.cpp @@ -181,7 +181,7 @@ struct vector_type *v32; // [esp+78h] [ebp+10h] v4 = this; TCollisionComponent::TCollisionComponent(this, a2, a3, 0); -*(_DWORD *)v4 = &TKickout::`vftable`; +*(_DWORD *)v4 = &TKickout::vftable; *(_DWORD *)((char *)v4 + 82) = a4 == 0; if ( !a4 ) *((_BYTE *)v4 + 5) = 0; @@ -237,4 +237,4 @@ v28 = *(_DWORD *)((char *)v4 + 118); edges_insert_circle((struct circle_type *)&v26, 0, (TKickout *)((char *)v4 + 154)); return v4; } -// 1002690: using guessed type void *TKickout::`vftable`; +// 1002690: using guessed type void *TKickout::vftable; diff --git a/Classes/TKickout/TKickout.h b/Classes/TKickout/TKickout.h index b79978d..4334662 100644 --- a/Classes/TKickout/TKickout.h +++ b/Classes/TKickout/TKickout.h @@ -19,6 +19,6 @@ int __thiscall TKickout::get_scoring(TKickout* this, int); // idb void __thiscall TKickout::put_scoring(TKickout* this, int, int); // idb TKickout* __thiscall TKickout::TKickout(TKickout* this, struct TPinballTable* a2, int a3, struct vector_type* a4); -void* TKickout::`vftable` = &TKickout::Message; // weak +void* TKickout::vftable = &TKickout::Message; // weak #endif //PINBALL_TKICKOUT_H diff --git a/Classes/TLight/TLight.cpp b/Classes/TLight/TLight.cpp index 3196053..9f8feff 100644 --- a/Classes/TLight/TLight.cpp +++ b/Classes/TLight/TLight.cpp @@ -349,7 +349,7 @@ double v7; // st7 v3 = this; TPinballComponent::TPinballComponent(this, a2, a3, 1); -*(_DWORD *)v3 = &TLight::`vftable`; +*(_DWORD *)v3 = &TLight::vftable; *(_DWORD *)((char *)v3 + 110) = 0; *(_DWORD *)((char *)v3 + 82) = 0; *(_DWORD *)((char *)v3 + 114) = 0; @@ -365,4 +365,4 @@ v7 = *v6; *(float *)((char *)v3 + 106) = v7; return v3; } -// 1001A48: using guessed type void *TLight::`vftable`; +// 1001A48: using guessed type void *TLight::vftable; diff --git a/Classes/TLight/TLight.h b/Classes/TLight/TLight.h index 54a4640..4a9f0e2 100644 --- a/Classes/TLight/TLight.h +++ b/Classes/TLight/TLight.h @@ -16,6 +16,6 @@ void __thiscall TLight::schedule_timeout(TLight* this, float); // idb int __thiscall TLight::Message(TLight* this, int, float); // idb TLight* __thiscall TLight::TLight(TLight* this, struct TPinballTable* a2, int a3); -void* TLight::`vftable` = &TLight::Message; // weak +void* TLight::vftable = &TLight::Message; // weak #endif //PINBALL_TLIGHT_H diff --git a/Classes/TLightBargraph/TLightBargraph.cpp b/Classes/TLightBargraph/TLightBargraph.cpp index 461b679..aa207f3 100644 --- a/Classes/TLightBargraph/TLightBargraph.cpp +++ b/Classes/TLightBargraph/TLightBargraph.cpp @@ -11,12 +11,12 @@ TZmapList *__thiscall TLightBargraph::~TLightBargraph(TLightBargraph *this) v1 = this; v2 = *(_DWORD *)((char *)this + 138); - *(_DWORD *)this = &TLightBargraph::`vftable`; + *(_DWORD *)this = &TLightBargraph::vftable; if ( v2 ) memoryfree(v2); return TLightGroup::~TLightGroup(v1); } -// 1001A30: using guessed type void *TLightBargraph::`vftable`; +// 1001A30: using guessed type void *TLightBargraph::vftable; //----- (0100AAA9) -------------------------------------------------------- void __thiscall TLightBargraph::Reset(TLightBargraph *this) @@ -159,7 +159,7 @@ int i; // eax v3 = this; TLightGroup::TLightGroup(this, a2, a3); -*(_DWORD *)v3 = &TLightBargraph::`vftable`; +*(_DWORD *)v3 = &TLightBargraph::vftable; *(_DWORD *)((char *)v3 + 138) = 0; TLightBargraph::Reset(v3); if ( a3 > 0 ) @@ -179,7 +179,7 @@ for ( i = 0; i < v5; ++v4 ) } return v3; } -// 1001A30: using guessed type void *TLightBargraph::`vftable`; +// 1001A30: using guessed type void *TLightBargraph::vftable; //----- (0100AEF9) -------------------------------------------------------- TLightBargraph *__thiscall TLightBargraph::`vector deleting destructor'(TLightBargraph *this, char a2) diff --git a/Classes/TLightBargraph/TLightBargraph.h b/Classes/TLightBargraph/TLightBargraph.h index 1401df4..3f020dd 100644 --- a/Classes/TLightBargraph/TLightBargraph.h +++ b/Classes/TLightBargraph/TLightBargraph.h @@ -17,6 +17,6 @@ int __thiscall TLightBargraph::Message(TLightBargraph* this, int, float); // idb TLightBargraph* __thiscall TLightBargraph::TLightBargraph(TLightBargraph* this, struct TPinballTable* a2, int a3); TLightBargraph* __thiscall TLightBargraph::`vector deleting destructor'(TLightBargraph *this, char a2); -void* TLightBargraph::`vftable` = &TLightBargraph::Message; // weak +void* TLightBargraph::vftable = &TLightBargraph::Message; // weak #endif //PINBALL_TLIGHTBARGRAPH_H diff --git a/Classes/TLightRollover/TLightRollover.cpp b/Classes/TLightRollover/TLightRollover.cpp index f83cc6f..9be3014 100644 --- a/Classes/TLightRollover/TLightRollover.cpp +++ b/Classes/TLightRollover/TLightRollover.cpp @@ -80,7 +80,7 @@ bool v4; // zf v3 = this; TRollover::TRollover(this, a2, a3, 0); v4 = *(_DWORD *)((char *)v3 + 34) == 0; -*(_DWORD *)v3 = &TLightRollover::`vftable`; +*(_DWORD *)v3 = &TLightRollover::vftable; *((_BYTE *)v3 + 78) = 0; *(_DWORD *)((char *)v3 + 91) = 0; if ( !v4 ) @@ -89,4 +89,4 @@ TRollover::build_walls(v3, a3); *(_DWORD *)((char *)v3 + 87) = *(_DWORD *)loader_query_float_attribute(a3, 0, 407); return v3; } -// 1002630: using guessed type void *TLightRollover::`vftable`; +// 1002630: using guessed type void *TLightRollover::vftable; diff --git a/Classes/TLightRollover/TLightRollover.h b/Classes/TLightRollover/TLightRollover.h index 0b625ae..da528b9 100644 --- a/Classes/TLightRollover/TLightRollover.h +++ b/Classes/TLightRollover/TLightRollover.h @@ -15,6 +15,6 @@ void __thiscall TLightRollover::Collision(TLightRollover* this, struct TBall*, s int __thiscall TLightRollover::Message(TLightRollover* this, int, float); // idb TLightRollover* __thiscall TLightRollover::TLightRollover(TLightRollover* this, struct TPinballTable* a2, int a3); -void* TLightRollover::`vftable` = &TLightRollover::Message; // weak +void* TLightRollover::vftable = &TLightRollover::Message; // weak #endif //PINBALL_TLIGHTROLLOVER_H diff --git a/Classes/TLine/TLine.cpp b/Classes/TLine/TLine.cpp index 169f71e..e2a83fa 100644 --- a/Classes/TLine/TLine.cpp +++ b/Classes/TLine/TLine.cpp @@ -11,11 +11,11 @@ TEdgeSegment::TEdgeSegment(this, a2, a3, a4); *(float *)((char *)v8 + 73) = a6; *(float *)((char *)v8 + 77) = a7; *(float *)((char *)v8 + 81) = a8; -*(_DWORD *)v8 = &TLine::`vftable`; +*(_DWORD *)v8 = &TLine::vftable; line_init((int)v8 + 21, a5, a6, a7, a8); return v8; } -// 1002864: using guessed type void *TLine::`vftable`; +// 1002864: using guessed type void *TLine::vftable; //----- (0101C764) -------------------------------------------------------- double __thiscall TLine::FindCollisionDistance(TLine *this, struct ray_type *a2) @@ -32,7 +32,7 @@ float v8; // ST10_4 v6 = this; TEdgeSegment::TEdgeSegment(this, a2, a3, a4); -*(_DWORD *)v6 = &TLine::`vftable`; +*(_DWORD *)v6 = &TLine::vftable; *(_DWORD *)((char *)v6 + 69) = *(_DWORD *)a5; *(_DWORD *)((char *)v6 + 73) = *((_DWORD *)a5 + 1); *(_DWORD *)((char *)v6 + 77) = *(_DWORD *)a6; @@ -42,7 +42,7 @@ v8 = v7; line_init((int)v6 + 21, *(float *)((char *)v6 + 69), *(float *)((char *)v6 + 73), *(float *)((char *)v6 + 77), v8); return v6; } -// 1002864: using guessed type void *TLine::`vftable`; +// 1002864: using guessed type void *TLine::vftable; //----- (0101C7E6) -------------------------------------------------------- void __thiscall TLine::EdgeCollision(TLine *this, struct TBall *a2, float a3) diff --git a/Classes/TLine/TLine.h b/Classes/TLine/TLine.h index ad4e402..9184e57 100644 --- a/Classes/TLine/TLine.h +++ b/Classes/TLine/TLine.h @@ -17,6 +17,6 @@ void __thiscall TLine::EdgeCollision(TLine* this, struct TBall*, float); // idb void __thiscall TLine::Offset(TLine* this, float); // idb void __thiscall TLine::place_in_grid(TLine* this); // idb -void* TLine::`vftable` = &TLine::EdgeCollision; // weak +void* TLine::vftable = &TLine::EdgeCollision; // weak #endif //PINBALL_TLINE_H diff --git a/Classes/TOneWay/TOneWay.cpp b/Classes/TOneWay/TOneWay.cpp index 8f9382d..d270a58 100644 --- a/Classes/TOneWay/TOneWay.cpp +++ b/Classes/TOneWay/TOneWay.cpp @@ -83,7 +83,7 @@ int v17; // [esp+68h] [ebp-8h] v3 = 0; v4 = this; TCollisionComponent::TCollisionComponent(this, a2, a3, 0); -*(_DWORD *)v4 = &TOneway::`vftable`; +*(_DWORD *)v4 = &TOneway::vftable; loader_query_visual(a3, 0, &v10); if ( v11 == 2 ) { @@ -116,7 +116,7 @@ objlist_class::Add((TOneway *)((char *)v4 + 42), *(void **)((char *)v4 + 82)); } return v4; } -// 1002530: using guessed type void *TOneway::`vftable`; +// 1002530: using guessed type void *TOneway::vftable; //----- (0101AAA7) -------------------------------------------------------- TOneway *__thiscall TOneway::`scalar deleting destructor`(TOneway *this, char a2) diff --git a/Classes/TOneWay/TOneWay.h b/Classes/TOneWay/TOneWay.h index fec3e40..11b0e53 100644 --- a/Classes/TOneWay/TOneWay.h +++ b/Classes/TOneWay/TOneWay.h @@ -16,6 +16,6 @@ void __thiscall TOneway::Collision(TOneway* this, struct TBall*, struct vector_t TOneway* __thiscall TOneway::TOneway(TOneway* this, struct TPinballTable* a2, int a3); TOneway* __thiscall TOneway::`scalar deleting destructor`(TOneway* this, char a2); -void* TOneway::`vftable` = &TPinballComponent::Message; // weak +void* TOneway::vftable = &TPinballComponent::Message; // weak #endif //PINBALL_TONEWAY_H diff --git a/Classes/TPinballComponent/TPinballComponent.cpp b/Classes/TPinballComponent/TPinballComponent.cpp index e0599cf..97a426a 100644 --- a/Classes/TPinballComponent/TPinballComponent.cpp +++ b/Classes/TPinballComponent/TPinballComponent.cpp @@ -5,13 +5,13 @@ #include "TPinballComponent.h" //----- (010145F5) -------------------------------------------------------- -void* __stdcall TPinballComponent::operator new(size_t SizeOfElements) +void* TPinballComponent::operator new(size_t SizeOfElements) { return _calloc(1u, SizeOfElements); } //----- (010159A9) -------------------------------------------------------- -int __thiscall TPinballComponent::Message(TPinballComponent* this, int a2, float a3) +int TPinballComponent::Message(int a2, float a3) { *(_DWORD*)((char*)this + 6) = a2; if (a2 == 1024) @@ -20,15 +20,15 @@ int __thiscall TPinballComponent::Message(TPinballComponent* this, int a2, float } //----- (010159CA) -------------------------------------------------------- -int __stdcall TPinballComponent::get_scoring(int a2) +int TPinballComponent::get_scoring(int a2) { return 0; } //----- (01017C6D) -------------------------------------------------------- -TPinballComponent* __thiscall TPinballComponent::TPinballComponent(TPinballComponent* this, struct TPinballTable* a2, int a3, int a4) +TPinballComponent* TPinballComponent::TPinballComponent(struct TPinballTable* a2, int a3, int a4) { - TPinballComponent* v4; // esi + TPinballComponent* this; // esi struct TPinballTable* v5; // edi TZmapList* v6; // eax TZmapList* v7; // eax @@ -42,26 +42,11 @@ TPinballComponent* __thiscall TPinballComponent::TPinballComponent(TPinballCompo signed int v15; // ebx _DWORD* v16; // eax int v17; // eax - char v19; // [esp+Ch] [ebp-6Ch] - void* v20; // [esp+4Ch] [ebp-2Ch] - void* v21; // [esp+50h] [ebp-28h] - int v22; // [esp+54h] [ebp-24h] - int v23; // [esp+58h] [ebp-20h] - int v24; // [esp+5Ch] [ebp-1Ch] - int v25; // [esp+60h] [ebp-18h] - int v26; // [esp+64h] [ebp-14h] - int v27; // [esp+68h] [ebp-10h] - int v28; // [esp+6Ch] [ebp-Ch] - int v29; // [esp+70h] [ebp-8h] - int v30; // [esp+74h] [ebp-4h] - struct TPinballTable* v31; // [esp+80h] [ebp+8h] - struct TPinballTable* v32; // [esp+80h] [ebp+8h] - signed int v33; // [esp+88h] [ebp+10h] - v4 = this; + this = this; v5 = a2; - *(_DWORD*)this = &TPinballComponent::`vftable`; - * (_DWORD*)((char*)this + 6) = 0; + + * (_DWORD*)((char*)this + 6) = 0; *((_BYTE*)this + 4) = 0; *((_BYTE*)this + 5) = 0; *(_DWORD*)((char*)this + 30) = a2; @@ -69,7 +54,7 @@ TPinballComponent* __thiscall TPinballComponent::TPinballComponent(TPinballCompo if (a2) objlist_class::Add((struct TPinballTable*)((char*)a2 + 250), (void*)this); if (a3 >= 0) - * (_DWORD*)((char*)v4 + 10) = loader_query_name(a3); + * (_DWORD*)((char*)this + 10) = loader_query_name(a3); if (a4 && a3 >= 0) { v33 = loader_query_visual_states(a3); @@ -81,41 +66,41 @@ TPinballComponent* __thiscall TPinballComponent::TPinballComponent(TPinballCompo loader_query_visual(a3, (signed int)v31, &v19); if (v20) { - if (!*(_DWORD*)((char*)v4 + 34)) + if (!*(_DWORD*)((char*)this + 34)) { v6 = (TZmapList*)operator new(8u); if (v6) v7 = TZmapList::TZmapList(v6, v33, 4); else v7 = 0; - *(_DWORD*)((char*)v4 + 34) = v7; + *(_DWORD*)((char*)this + 34) = v7; } - v8 = *(objlist_class * *)((char*)v4 + 34); + v8 = *(objlist_class * *)((char*)this + 34); if (v8) objlist_class::Add(v8, v20); } if (v21) { - if (!*(_DWORD*)((char*)v4 + 38)) + if (!*(_DWORD*)((char*)this + 38)) { v9 = (TZmapList*)operator new(8u); if (v9) v10 = TZmapList::TZmapList(v9, v33, 4); else v10 = 0; - *(_DWORD*)((char*)v4 + 38) = v10; + *(_DWORD*)((char*)this + 38) = v10; } - v11 = *(objlist_class * *)((char*)v4 + 38); + v11 = *(objlist_class * *)((char*)this + 38); if (v11) objlist_class::Add(v11, v21); } v31 = (struct TPinballTable*)((char*)v31 + 1); } while ((signed int)v31 < v33); } - v12 = *(_DWORD*)((char*)v4 + 38); + v12 = *(_DWORD*)((char*)this + 38); if (v12) v30 = *(_DWORD*)(*(_DWORD*)(v12 + 4) + 8); - v13 = *(_DWORD*)((char*)v4 + 34); + v13 = *(_DWORD*)((char*)this + 34); if (v13) { v14 = *(_DWORD * *)(*(_DWORD*)(v13 + 4) + 8); @@ -129,7 +114,7 @@ TPinballComponent* __thiscall TPinballComponent::TPinballComponent(TPinballCompo v32 = (struct TPinballTable*)12; do { - v16 = *(_DWORD * *)((char*)v32 + *(_DWORD*)(*(_DWORD*)((char*)v4 + 34) + 4)); + v16 = *(_DWORD * *)((char*)v32 + *(_DWORD*)(*(_DWORD*)((char*)this + 34) + 4)); v22 = *(_DWORD*)((char*)v16 + 29) - *(_DWORD*)((char*)v5 + 234); v23 = *(_DWORD*)((char*)v16 + 33) - *(_DWORD*)((char*)v5 + 238); v24 = v16[3]; @@ -137,22 +122,22 @@ TPinballComponent* __thiscall TPinballComponent::TPinballComponent(TPinballCompo enclosing_box(&v26, &v22, &v26); v32 = (struct TPinballTable*)((char*)v32 + 4); ++v15; - } while (v15 < *(_DWORD*)(*(_DWORD*)(*(_DWORD*)((char*)v4 + 34) + 4) + 4)); + } while (v15 < *(_DWORD*)(*(_DWORD*)(*(_DWORD*)((char*)this + 34) + 4) + 4)); } - v17 = *(_DWORD*)(*(_DWORD*)(*(_DWORD*)((char*)v4 + 34) + 4) + 8); - *(_DWORD*)((char*)v4 + 26) = render_create_sprite( + v17 = *(_DWORD*)(*(_DWORD*)(*(_DWORD*)((char*)this + 34) + 4) + 8); + *(_DWORD*)((char*)this + 26) = render_create_sprite( v33 > 0, - *(_DWORD*)(*(_DWORD*)(*(_DWORD*)((char*)v4 + 34) + 4) + 8), + *(_DWORD*)(*(_DWORD*)(*(_DWORD*)((char*)this + 34) + 4) + 8), v30, *(_DWORD*)(v17 + 29) - *(_DWORD*)((char*)v5 + 234), *(_DWORD*)(v17 + 33) - *(_DWORD*)((char*)v5 + 238), &v26); } } - *(_DWORD*)((char*)v4 + 22) = a3; - return v4; + *(_DWORD*)((char*)this + 22) = a3; + return this; } -// 10024A8: using guessed type void *TPinballComponent::`vftable`; +// 10024A8: using guessed type void *TPinballComponent::vftable; //----- (01018FBC) -------------------------------------------------------- TZmapList* __thiscall TPinballComponent::~TPinballComponent(TPinballComponent* this) @@ -164,7 +149,7 @@ TZmapList* __thiscall TPinballComponent::~TPinballComponent(TPinballComponent* t v1 = this; result = *(TZmapList * *)((char*)this + 30); - *(_DWORD*)this = &TPinballComponent::`vftable`; + *(_DWORD*)this = &TPinballComponent::vftable; if (result) result = (TZmapList*)objlist_delete_object(*(_DWORD*)((char*)result + 254), (int)this); v3 = *(TZmapList * *)((char*)v1 + 34); @@ -175,7 +160,7 @@ TZmapList* __thiscall TPinballComponent::~TPinballComponent(TPinballComponent* t result = TZmapList::`scalar deleting destructor`(v4, 1); return result; } -// 10024A8: using guessed type void *TPinballComponent::`vftable`; +// 10024A8: using guessed type void *TPinballComponent::vftable; //----- (01018FFD) -------------------------------------------------------- TComponentGroup* __thiscall TComponentGroup::TComponentGroup(TComponentGroup* this, struct TPinballTable* a2, int a3) @@ -189,7 +174,7 @@ TComponentGroup* __thiscall TComponentGroup::TComponentGroup(TComponentGroup* th v3 = this; TPinballComponent::TPinballComponent(this, a2, a3, 0); - *(_DWORD*)v3 = &TComponentGroup::`vftable`; + *(_DWORD*)v3 = &TComponentGroup::vftable; objlist_class::objlist_class((TComponentGroup*)((char*)v3 + 42), 4, 4); *(_DWORD*)((char*)v3 + 50) = 0; if (a3 > 0) @@ -206,7 +191,7 @@ TComponentGroup* __thiscall TComponentGroup::TComponentGroup(TComponentGroup* th } return v3; } -// 10024D8: using guessed type void *TComponentGroup::`vftable`; +// 10024D8: using guessed type void *TComponentGroup::vftable; //----- (01019082) -------------------------------------------------------- TZmapList* __thiscall TComponentGroup::~TComponentGroup(TComponentGroup* this) @@ -216,7 +201,7 @@ TZmapList* __thiscall TComponentGroup::~TComponentGroup(TComponentGroup* this) v1 = this; v2 = *(_DWORD*)((char*)this + 50); - *(_DWORD*)this = &TComponentGroup::`vftable`; + *(_DWORD*)this = &TComponentGroup::vftable; if (v2) { timer_kill(v2); @@ -225,5 +210,5 @@ TZmapList* __thiscall TComponentGroup::~TComponentGroup(TComponentGroup* this) objlist_destroy(*(_DWORD*)((char*)v1 + 46)); return TPinballComponent::~TPinballComponent(v1); } -// 10024D8: using guessed type void *TComponentGroup::`vftable`; +// 10024D8: using guessed type void *TComponentGroup::vftable; diff --git a/Classes/TPinballComponent/TPinballComponent.h b/Classes/TPinballComponent/TPinballComponent.h index 496f6bc..6542d34 100644 --- a/Classes/TPinballComponent/TPinballComponent.h +++ b/Classes/TPinballComponent/TPinballComponent.h @@ -8,16 +8,31 @@ #define PINBALL_TPINBALLCOMPONENT_H /* 100 */ -struct TPinballComponent; +struct TPinballComponent { -void* __stdcall TPinballComponent::operator new(size_t SizeOfElements); // idb -int __thiscall TPinballComponent::Message(TPinballComponent* this, int, float); // idb -int __stdcall TPinballComponent::get_scoring(int a2); -struct TPinballComponent* __thiscall TPinballTable::find_component(TPinballTable* this, char*); // idb -struct TPinballComponent* __thiscall TPinballTable::find_component(TPinballTable* this, int); // idb -TPinballComponent* __thiscall TPinballComponent::TPinballComponent(TPinballComponent* this, struct TPinballTable* a2, int a3, int a4); -TZmapList* __thiscall TPinballComponent::~TPinballComponent(TPinballComponent* this); + char v19; // [esp+Ch] [ebp-6Ch] + void* v20; // [esp+4Ch] [ebp-2Ch] + void* v21; // [esp+50h] [ebp-28h] + int v22; // [esp+54h] [ebp-24h] + int v23; // [esp+58h] [ebp-20h] + int v24; // [esp+5Ch] [ebp-1Ch] + int v25; // [esp+60h] [ebp-18h] + int v26; // [esp+64h] [ebp-14h] + int v27; // [esp+68h] [ebp-10h] + int v28; // [esp+6Ch] [ebp-Ch] + int v29; // [esp+70h] [ebp-8h] + int v30; // [esp+74h] [ebp-4h] + struct TPinballTable* v31; // [esp+80h] [ebp+8h] + struct TPinballTable* v32; // [esp+80h] [ebp+8h] + signed int v33; // [esp+88h] [ebp+10h] -void* TPinballComponent::`vftable` = &TPinballComponent::Message; // weak + void* operator new(size_t SizeOfElements); // idb + int Message(int, float); // idb + int __stdcall TPinballComponent::get_scoring(int a2); + TPinballComponent* TPinballComponent::TPinballComponent(TPinballTable* a2, int a3, int a4); + TZmapList* TPinballComponent::~TPinballComponent(); + + void* TPinballComponent::vftable = &TPinballComponent::Message; // weak +} #endif //PINBALL_TPINBALLCOMPONENT_H diff --git a/Classes/TPinballTable/TPinballTable.cpp b/Classes/TPinballTable/TPinballTable.cpp index 5e2c95f..c8f4e0d 100644 --- a/Classes/TPinballTable/TPinballTable.cpp +++ b/Classes/TPinballTable/TPinballTable.cpp @@ -657,7 +657,7 @@ int i; // ecx signed int v5; // [esp+Ch] [ebp-4h] v1 = this; -*(_DWORD *)this = &TPinballTable::`vftable`; +*(_DWORD *)this = &TPinballTable::vftable; v2 = (int *)((char *)this + 102); v5 = 4; do @@ -692,7 +692,7 @@ objlist_destroy(*(_DWORD *)((char *)v1 + 262)); objlist_destroy(*(_DWORD *)((char *)v1 + 254)); return TPinballComponent::~TPinballComponent(v1); } -// 1002790: using guessed type void *TPinballTable::`vftable`; +// 1002790: using guessed type void *TPinballTable::vftable; //----- (0101A9F2) -------------------------------------------------------- TPinballTable *__thiscall TPinballTable::`vector deleting destructor`(TPinballTable *this, char a2) @@ -763,7 +763,7 @@ int i; // [esp+10h] [ebp-4h] v1 = 0; v2 = this; TPinballComponent::TPinballComponent(this, 0, -1, 0); -*(_DWORD *)v2 = &TPinballTable::`vftable`; +*(_DWORD *)v2 = &TPinballTable::vftable; objlist_class::objlist_class((TPinballTable *)((char *)v2 + 250), 32, 16); objlist_class::objlist_class((TPinballTable *)((char *)v2 + 258), 3, 1); *(_DWORD *)((char *)v2 + 50) = 0; @@ -991,5 +991,5 @@ MissTextBox = TPinballTable::find_component(v2, "mission_text_box"); control_make_links(v2); return v2; } -// 1002790: using guessed type void *TPinballTable::`vftable`; +// 1002790: using guessed type void *TPinballTable::vftable; diff --git a/Classes/TPinballTable/TPinballTable.h b/Classes/TPinballTable/TPinballTable.h index 4e426ac..e988f96 100644 --- a/Classes/TPinballTable/TPinballTable.h +++ b/Classes/TPinballTable/TPinballTable.h @@ -22,7 +22,9 @@ void __stdcall TPinballTable::tilt_timeout(int, void*); // idb TZmapList* __thiscall TPinballTable::~TPinballTable(TPinballTable* this); TPinballTable* __thiscall TPinballTable::`vector deleting destructor'(TPinballTable *this, char a2); TPinballTable* __thiscall TPinballTable::TPinballTable(TPinballTable* this); +TPinballComponent* __thiscall TPinballTable::find_component(TPinballTable* this, char*); // idb +TPinballComponent* __thiscall TPinballTable::find_component(TPinballTable* this, int); // idb -void* TPinballTable::`vftable` = &TPinballTable::Message; // weak +void* TPinballTable::vftable = &TPinballTable::Message; // weak #endif //PINBALL_TPINBALLTABLE_H diff --git a/Classes/TPlunger/TPlunger.cpp b/Classes/TPlunger/TPlunger.cpp index c6804a2..17f65fd 100644 --- a/Classes/TPlunger/TPlunger.cpp +++ b/Classes/TPlunger/TPlunger.cpp @@ -169,7 +169,7 @@ int v12; // [esp+44h] [ebp-Ch] v3 = this; TCollisionComponent::TCollisionComponent(this, a2, a3, 1); -*(_DWORD *)v3 = &TPlunger::`vftable`; +*(_DWORD *)v3 = &TPlunger::vftable; loader_query_visual(a3, 0, &v9); v4 = v11; *(float *)((char *)v3 + 62) = 0.0; @@ -191,4 +191,4 @@ v7 = (_DWORD *)loader_query_float_attribute(a3, 0, 601); *(_DWORD *)((char *)a2 + 290) = v7[1]; return v3; } -// 1002750: using guessed type void *TPlunger::`vftable`; +// 1002750: using guessed type void *TPlunger::vftable; diff --git a/Classes/TPlunger/TPlunger.h b/Classes/TPlunger/TPlunger.h index 6f47c1b..6dd19aa 100644 --- a/Classes/TPlunger/TPlunger.h +++ b/Classes/TPlunger/TPlunger.h @@ -17,6 +17,6 @@ int __thiscall TPlunger::Message(TPlunger* this, int, float); // idb void __thiscall TPlunger::Collision(TPlunger* this, struct TBall*, struct vector_type*, struct vector_type*, float, struct TEdgeSegment*); // idb TPlunger* __thiscall TPlunger::TPlunger(TPlunger* this, struct TPinballTable* a2, int a3); -void* TPlunger::`vftable` = &TPlunger::Message; // weak +void* TPlunger::vftable = &TPlunger::Message; // weak #endif //PINBALL_TPLUNGER_H diff --git a/Classes/TPopupTarget/TPopupTarget.cpp b/Classes/TPopupTarget/TPopupTarget.cpp index 0afa785..2d5f5e4 100644 --- a/Classes/TPopupTarget/TPopupTarget.cpp +++ b/Classes/TPopupTarget/TPopupTarget.cpp @@ -124,10 +124,10 @@ int v4; // eax v3 = this; TCollisionComponent::TCollisionComponent(this, a2, a3, 1); -*(_DWORD *)v3 = &TPopupTarget::`vftable`; +*(_DWORD *)v3 = &TPopupTarget::vftable; v4 = *(_DWORD *)loader_query_float_attribute(a3, 0, 407); *(_DWORD *)((char *)v3 + 78) = 0; *(_DWORD *)((char *)v3 + 82) = v4; return v3; } -// 10025A4: using guessed type void *TPopupTarget::`vftable`; +// 10025A4: using guessed type void *TPopupTarget::vftable; diff --git a/Classes/TPopupTarget/TPopupTarget.h b/Classes/TPopupTarget/TPopupTarget.h index 671ee58..1531fea 100644 --- a/Classes/TPopupTarget/TPopupTarget.h +++ b/Classes/TPopupTarget/TPopupTarget.h @@ -17,6 +17,6 @@ void __thiscall TPopupTarget::put_scoring(TPopupTarget* this, int, int); // idb void __thiscall TPopupTarget::Collision(TPopupTarget* this, struct TBall*, struct vector_type*, struct vector_type*, float, struct TEdgeSegment*); // idb TPopupTarget* __thiscall TPopupTarget::TPopupTarget(TPopupTarget* this, struct TPinballTable* a2, int a3); -void* TPopupTarget::`vftable` = &TPopupTarget::Message; // weak +void* TPopupTarget::vftable = &TPopupTarget::Message; // weak #endif //PINBALL_TPOPUPTARGET_H diff --git a/Classes/TRamp/TRamp.cpp b/Classes/TRamp/TRamp.cpp index 70c5a5d..d1c3466 100644 --- a/Classes/TRamp/TRamp.cpp +++ b/Classes/TRamp/TRamp.cpp @@ -188,7 +188,7 @@ float v88; // [esp+A4h] [ebp-4h] v3 = a3; v4 = this; TCollisionComponent::TCollisionComponent(this, a2, (int)a3, 0); -*(_DWORD *)v4 = &TRamp::`vftable`; +*(_DWORD *)v4 = &TRamp::vftable; *(_DWORD *)((char *)v4 + 6) = 0; *((_BYTE *)v4 + 4) = 1; loader_query_visual((int)v3, 0, &v73); @@ -590,4 +590,4 @@ v71 = v70; edges_insert_square(v86, v71, v69, v66, 0, (TRamp *)((char *)v4 + 94)); return v4; } -// 10026CC: using guessed type void *TRamp::`vftable`; +// 10026CC: using guessed type void *TRamp::vftable; diff --git a/Classes/TRamp/TRamp.h b/Classes/TRamp/TRamp.h index d3b3e08..756cfd5 100644 --- a/Classes/TRamp/TRamp.h +++ b/Classes/TRamp/TRamp.h @@ -16,6 +16,6 @@ void __thiscall TRamp::Collision(TRamp* this, struct TBall*, struct vector_type* int __thiscall TRamp::FieldEffect(TRamp* this, struct TBall*, struct vector_type*); // idb TRamp* __thiscall TRamp::TRamp(TRamp* this, struct TPinballTable* a2, void* a3); -void* TRamp::`vftable` = &TPinballComponent::Message; // weak +void* TRamp::vftable = &TPinballComponent::Message; // weak #endif //PINBALL_TRAMP_H diff --git a/Classes/TRollover/TRollover.cpp b/Classes/TRollover/TRollover.cpp index 2654028..6b1387d 100644 --- a/Classes/TRollover/TRollover.cpp +++ b/Classes/TRollover/TRollover.cpp @@ -109,10 +109,10 @@ TRollover *v4; // esi v4 = this; TCollisionComponent::TCollisionComponent(this, a2, a3, a4); -*(_DWORD *)v4 = &TRollover::`vftable`; +*(_DWORD *)v4 = &TRollover::vftable; return v4; } -// 1002614: using guessed type void *TRollover::`vftable`; +// 1002614: using guessed type void *TRollover::vftable; //----- (01019771) -------------------------------------------------------- TRollover *__thiscall TRollover::TRollover(TRollover *this, struct TPinballTable *a2, int a3) @@ -123,11 +123,11 @@ int v4; // eax v3 = this; TCollisionComponent::TCollisionComponent(this, a2, a3, 0); v4 = *(_DWORD *)((char *)v3 + 34); -*(_DWORD *)v3 = &TRollover::`vftable`; +*(_DWORD *)v3 = &TRollover::vftable; *((_BYTE *)v3 + 78) = 0; if ( v4 ) render_sprite_set_bitmap(*(_DWORD **)((char *)v3 + 26), *(_DWORD *)(*(_DWORD *)(v4 + 4) + 8)); TRollover::build_walls(v3, a3); return v3; } -// 1002614: using guessed type void *TRollover::`vftable`; +// 1002614: using guessed type void *TRollover::vftable; diff --git a/Classes/TRollover/TRollover.h b/Classes/TRollover/TRollover.h index 822b0fe..3297673 100644 --- a/Classes/TRollover/TRollover.h +++ b/Classes/TRollover/TRollover.h @@ -19,6 +19,6 @@ void __thiscall TRollover::Collision(TRollover* this, struct TBall*, struct vect TRollover* __thiscall TRollover::TRollover(TRollover* this, struct TPinballTable* a2, int a3, int a4); TRollover* __thiscall TRollover::TRollover(TRollover* this, struct TPinballTable* a2, int a3); -void* TRollover::`vftable` = &TRollover::Message; // weak +void* TRollover::vftable = &TRollover::Message; // weak #endif //PINBALL_TROLLOVER_H diff --git a/Classes/TSink/TSink.cpp b/Classes/TSink/TSink.cpp index 5a440a8..5775a3b 100644 --- a/Classes/TSink/TSink.cpp +++ b/Classes/TSink/TSink.cpp @@ -127,7 +127,7 @@ int v17; // [esp+48h] [ebp-Ch] v3 = this; TCollisionComponent::TCollisionComponent(this, a2, a3, 1); -*(_DWORD *)v3 = &TSink::`vftable`; +*(_DWORD *)v3 = &TSink::vftable; *(_DWORD *)((char *)v3 + 6) = 0; *(_DWORD *)((char *)v3 + 78) = 0; loader_query_visual(a3, 0, &v9); @@ -148,4 +148,4 @@ v7 = (_DWORD *)loader_query_float_attribute(a3, 0, 601); *(_DWORD *)((char *)v3 + 82) = *(_DWORD *)loader_query_float_attribute(a3, 0, 407); return v3; } -// 1002704: using guessed type void *TSink::`vftable`; +// 1002704: using guessed type void *TSink::vftable; diff --git a/Classes/TSink/TSink.h b/Classes/TSink/TSink.h index 6e7ca29..b73acac 100644 --- a/Classes/TSink/TSink.h +++ b/Classes/TSink/TSink.h @@ -17,6 +17,6 @@ void __thiscall TSink::put_scoring(TSink* this, int, int); // idb void __thiscall TSink::Collision(TSink* this, struct TBall*, struct vector_type*, struct vector_type*, float, struct TEdgeSegment*); // idb TSink* __thiscall TSink::TSink(TSink* this, struct TPinballTable* a2, int a3); -void* TSink::`vftable` = &TSink::Message; // weak +void* TSink::vftable = &TSink::Message; // weak #endif //PINBALL_TSINK_H diff --git a/Classes/TSoloTarget/TSoloTarget.cpp b/Classes/TSoloTarget/TSoloTarget.cpp index 3a9d072..94fa3ca 100644 --- a/Classes/TSoloTarget/TSoloTarget.cpp +++ b/Classes/TSoloTarget/TSoloTarget.cpp @@ -87,11 +87,11 @@ int v6; // [esp+40h] [ebp-10h] v3 = this; TCollisionComponent::TCollisionComponent(this, a2, a3, 1); *(_DWORD *)((char *)v3 + 82) = 0; -*(_DWORD *)v3 = &TSoloTarget::`vftable`; +*(_DWORD *)v3 = &TSoloTarget::vftable; *(_DWORD *)((char *)v3 + 86) = 1036831949; loader_query_visual(a3, 0, &v5); *(_DWORD *)((char *)v3 + 90) = v6; TSoloTarget::Message(v3, 50, 0.0); return v3; } -// 10025C0: using guessed type void *TSoloTarget::`vftable`; +// 10025C0: using guessed type void *TSoloTarget::vftable; diff --git a/Classes/TSoloTarget/TSoloTarget.h b/Classes/TSoloTarget/TSoloTarget.h index 3f90d5e..6e8b2c5 100644 --- a/Classes/TSoloTarget/TSoloTarget.h +++ b/Classes/TSoloTarget/TSoloTarget.h @@ -17,6 +17,6 @@ void __thiscall TSoloTarget::put_scoring(TSoloTarget* this, int, int); // idb void __thiscall TSoloTarget::Collision(TSoloTarget* this, struct TBall*, struct vector_type*, struct vector_type*, float, struct TEdgeSegment*); // idb TSoloTarget* __thiscall TSoloTarget::TSoloTarget(TSoloTarget* this, struct TPinballTable* a2, int a3); -void* TSoloTarget::`vftable` = &TSoloTarget::Message; // weak +void* TSoloTarget::vftable = &TSoloTarget::Message; // weak #endif //PINBALL_TSOLOTARGET_H diff --git a/Classes/TSound/TSound.cpp b/Classes/TSound/TSound.cpp index 407fd51..4bea9c3 100644 --- a/Classes/TSound/TSound.cpp +++ b/Classes/TSound/TSound.cpp @@ -31,10 +31,10 @@ int v6; // [esp+3Ch] [ebp-10h] v3 = this; TPinballComponent::TPinballComponent(this, a2, a3, 1); -*(_DWORD *)v3 = &TSound::`vftable`; +*(_DWORD *)v3 = &TSound::vftable; loader_query_visual(a3, 0, &v5); *(_DWORD *)((char *)v3 + 42) = v6; return v3; } -// 10027A4: using guessed type void *TSound::`vftable`; +// 10027A4: using guessed type void *TSound::vftable; diff --git a/Classes/TSound/TSound.h b/Classes/TSound/TSound.h index 4f18785..eb3a0b2 100644 --- a/Classes/TSound/TSound.h +++ b/Classes/TSound/TSound.h @@ -14,6 +14,6 @@ TSound* __thiscall TSound::`vector deleting destructor`(TSound *this, char a2); double __thiscall TSound::Play(TSound* this); TSound* __thiscall TSound::TSound(TSound* this, struct TPinballTable* a2, int a3); -void* TSound::`vftable` = &TPinballComponent::Message; // weak +void* TSound::vftable = &TPinballComponent::Message; // weak #endif //PINBALL_TSOUND_H diff --git a/Classes/TTableLayer/TTableLayer.cpp b/Classes/TTableLayer/TTableLayer.cpp index 621e564..c271e80 100644 --- a/Classes/TTableLayer/TTableLayer.cpp +++ b/Classes/TTableLayer/TTableLayer.cpp @@ -70,7 +70,7 @@ struct TPinballTable *v46; // [esp+88h] [ebp+8h] v2 = a2; v3 = this; TCollisionComponent::TCollisionComponent(this, a2, -1, 0); -*(_DWORD *)v3 = &TTableLayer::`vftable`; +*(_DWORD *)v3 = &TTableLayer::vftable; v45 = (struct TPinballTable *)loader_query_handle("table"); loader_query_visual((int)v45, 0, &v30); v4 = (float *)loader_query_float_attribute((int)v45, 0, 700); @@ -230,7 +230,7 @@ v26, (TTableLayer *)((char *)v3 + 114)); return v3; } -// 100276C: using guessed type void *TTableLayer::`vftable`; +// 100276C: using guessed type void *TTableLayer::vftable; //----- (0101A928) -------------------------------------------------------- TZmapList *__thiscall TTableLayer::~TTableLayer(TTableLayer *this) @@ -238,12 +238,12 @@ TZmapList *__thiscall TTableLayer::~TTableLayer(TTableLayer *this) TCollisionComponent *v1; // esi v1 = this; -*(_DWORD *)this = &TTableLayer::`vftable`; +*(_DWORD *)this = &TTableLayer::vftable; if ( edge_manager ) TEdgeManager::`scalar deleting destructor`(edge_manager, 1); return TCollisionComponent::~TCollisionComponent(v1); } -// 100276C: using guessed type void *TTableLayer::`vftable`; +// 100276C: using guessed type void *TTableLayer::vftable; //----- (0101AACD) -------------------------------------------------------- TTableLayer *__thiscall TTableLayer::`scalar deleting destructor`(TTableLayer *this, char a2) diff --git a/Classes/TTableLayer/TTableLayer.h b/Classes/TTableLayer/TTableLayer.h index b20a194..87bc328 100644 --- a/Classes/TTableLayer/TTableLayer.h +++ b/Classes/TTableLayer/TTableLayer.h @@ -15,6 +15,6 @@ TTableLayer* __thiscall TTableLayer::TTableLayer(TTableLayer* this, struct TPinb TZmapList* __thiscall TTableLayer::~TTableLayer(TTableLayer* this); TTableLayer* __thiscall TTableLayer::`scalar deleting destructor`(TTableLayer* this, char a2); -void* TTableLayer::`vftable` = &TPinballComponent::Message; // weak +void* TTableLayer::vftable = &TPinballComponent::Message; // weak #endif //PINBALL_TTABLELAYER_H diff --git a/Classes/TTextBox/TTextBox.cpp b/Classes/TTextBox/TTextBox.cpp index 1a1e79c..f2c8bba 100644 --- a/Classes/TTextBox/TTextBox.cpp +++ b/Classes/TTextBox/TTextBox.cpp @@ -14,7 +14,7 @@ v3 = this; TPinballComponent::TPinballComponent(this, a2, a3, 1); v4 = a3 == 0; v5 = a3 < 0; -*(_DWORD *)v3 = &TTextBox::`vftable`; +*(_DWORD *)v3 = &TTextBox::vftable; *(_DWORD *)((char *)v3 + 42) = 0; *(_DWORD *)((char *)v3 + 46) = 0; *(_DWORD *)((char *)v3 + 50) = 0; @@ -38,7 +38,7 @@ v8 = *v6; } return v3; } -// 10023B4: using guessed type void *TTextBox::`vftable`; +// 10023B4: using guessed type void *TTextBox::vftable; // 10253C4: using guessed type struct score_msg_font_type *score_msg_fontp; //----- (01014143) -------------------------------------------------------- @@ -124,7 +124,7 @@ int v4; // edi v1 = this; v2 = *(_DWORD *)((char *)this + 58); -*(_DWORD *)this = &TTextBox::`vftable`; +*(_DWORD *)this = &TTextBox::vftable; if ( v2 ) { if ( v2 != -1 ) @@ -145,7 +145,7 @@ while ( v4 ); } return TPinballComponent::~TPinballComponent(v1); } -// 10023B4: using guessed type void *TTextBox::`vftable`; +// 10023B4: using guessed type void *TTextBox::vftable; //----- (01014269) -------------------------------------------------------- void __usercall TTextBox::Draw(TTextBox *this@, int a2@) diff --git a/Classes/TTextBox/TTextbox.h b/Classes/TTextBox/TTextbox.h index 150b8ea..d86cd64 100644 --- a/Classes/TTextBox/TTextbox.h +++ b/Classes/TTextBox/TTextbox.h @@ -19,6 +19,6 @@ TZmapList* __thiscall TTextBox::~TTextBox(TTextBox* this); TTextBox* __thiscall TTextBox::`scalar deleting destructor`(TTextBox *this, char a2); int __stdcall TTextBox::Message(int a2, float a3); -void* TTextBox::`vftable` = &TTextBox::Message; // weak +void* TTextBox::vftable = &TTextBox::Message; // weak #endif //PINBALL_TTEXTBOX_H diff --git a/Classes/TTimer/TTimer.cpp b/Classes/TTimer/TTimer.cpp index 959d4e9..5e25935 100644 --- a/Classes/TTimer/TTimer.cpp +++ b/Classes/TTimer/TTimer.cpp @@ -38,7 +38,7 @@ TTimer *v3; // esi v3 = this; TPinballComponent::TPinballComponent(this, a2, a3, 1); *(_DWORD *)((char *)v3 + 42) = 0; -*(_DWORD *)v3 = &TTimer::`vftable`; +*(_DWORD *)v3 = &TTimer::vftable; return v3; } -// 10027BC: using guessed type void *TTimer::`vftable`; +// 10027BC: using guessed type void *TTimer::vftable; diff --git a/Classes/TTimer/TTimer.h b/Classes/TTimer/TTimer.h index da61897..9012b87 100644 --- a/Classes/TTimer/TTimer.h +++ b/Classes/TTimer/TTimer.h @@ -14,6 +14,6 @@ void __stdcall TTimer::TimerExpired(int, struct TPinballComponent*); // idb int __thiscall TTimer::Message(TTimer* this, int, float); // idb TTimer* __thiscall TTimer::TTimer(TTimer* this, struct TPinballTable* a2, int a3); -void* TTimer::`vftable` = &TTimer::Message; // weak +void* TTimer::vftable = &TTimer::Message; // weak #endif //PINBALL_TTIMER_H diff --git a/Classes/TTripwire/TTripwire.cpp b/Classes/TTripwire/TTripwire.cpp index 3f082b7..aac35a4 100644 --- a/Classes/TTripwire/TTripwire.cpp +++ b/Classes/TTripwire/TTripwire.cpp @@ -26,7 +26,7 @@ TTripwire *v3; // esi v3 = this; TRollover::TRollover(this, a2, a3, 1); -*(_DWORD *)v3 = &TTripwire::`vftable`; +*(_DWORD *)v3 = &TTripwire::vftable; return v3; } -// 100264C: using guessed type void *TTripwire::`vftable`; +// 100264C: using guessed type void *TTripwire::vftable; diff --git a/Classes/TTripwire/TTripwire.h b/Classes/TTripwire/TTripwire.h index b756389..8f93cbf 100644 --- a/Classes/TTripwire/TTripwire.h +++ b/Classes/TTripwire/TTripwire.h @@ -13,6 +13,6 @@ struct TTripwire; void __thiscall TTripwire::Collision(TTripwire* this, struct TBall*, struct vector_type*, struct vector_type*, float, struct TEdgeSegment*); // idb TTripwire* __thiscall TTripwire::TTripwire(TTripwire* this, struct TPinballTable* a2, int a3); -void* TTripwire::`vftable` = &TRollover::Message; // weak +void* TTripwire::vftable = &TRollover::Message; // weak #endif //PINBALL_TTRIPWIRE_H diff --git a/Classes/TWall/TWall.cpp b/Classes/TWall/TWall.cpp index ea0d7ea..076baeb 100644 --- a/Classes/TWall/TWall.cpp +++ b/Classes/TWall/TWall.cpp @@ -68,7 +68,7 @@ int v5; // eax v3 = this; TCollisionComponent::TCollisionComponent(this, a2, a3, 1); v4 = *(_DWORD **)((char *)v3 + 26); -*(_DWORD *)v3 = &TWall::`vftable`; +*(_DWORD *)v3 = &TWall::vftable; if ( v4 ) render_sprite_set_bitmap(v4, 0); v5 = *(_DWORD *)((char *)v3 + 34); @@ -77,5 +77,5 @@ if ( v5 ) *(_DWORD *)((char *)v3 + 78) = 0; return v3; } -// 1002508: using guessed type void *TWall::`vftable`; +// 1002508: using guessed type void *TWall::vftable; diff --git a/Classes/TWall/TWall.h b/Classes/TWall/TWall.h index 184eeb6..72eb7a7 100644 --- a/Classes/TWall/TWall.h +++ b/Classes/TWall/TWall.h @@ -17,6 +17,6 @@ void __thiscall TWall::put_scoring(TWall* this, int, int); // idb void __thiscall TWall::Collision(TWall* this, struct TBall*, struct vector_type*, struct vector_type*, float, struct TEdgeSegment*); // idb TWall* __thiscall TWall::TWall(TWall* this, struct TPinballTable* a2, int a3); -void* TWall::`vftable` = &TWall::Message; // weak +void* TWall::vftable = &TWall::Message; // weak #endif //PINBALL_TWALL_H diff --git a/Classes/TlightGroup/TLightGroup.cpp b/Classes/TlightGroup/TLightGroup.cpp index b77cd0e..4b0cda7 100644 --- a/Classes/TlightGroup/TLightGroup.cpp +++ b/Classes/TlightGroup/TLightGroup.cpp @@ -767,7 +767,7 @@ int i; // [esp+1Ch] [ebp+Ch] v3 = this; TPinballComponent::TPinballComponent(this, a2, a3, 0); -*(_DWORD *)v3 = &TLightGroup::`vftable`; +*(_DWORD *)v3 = &TLightGroup::vftable; objlist_class::objlist_class((TLightGroup *)((char *)v3 + 42), 4, 4); *(_DWORD *)((char *)v3 + 70) = 0; *(_DWORD *)((char *)v3 + 66) = 0; @@ -786,7 +786,7 @@ objlist_class::Add((TLightGroup *)((char *)v3 + 42), (void *)v5); } return v3; } -// 1001A60: using guessed type void *TLightGroup::`vftable`; +// 1001A60: using guessed type void *TLightGroup::vftable; //----- (0100AE4C) -------------------------------------------------------- TLightGroup *__thiscall TLightGroup::`vector deleting destructor'(TLightGroup *this, char a2) diff --git a/Classes/TlightGroup/TLightGroup.h b/Classes/TlightGroup/TLightGroup.h index cdf32f1..344ab0f 100644 --- a/Classes/TlightGroup/TLightGroup.h +++ b/Classes/TlightGroup/TLightGroup.h @@ -22,6 +22,6 @@ int __thiscall TLightGroup::Message(TLightGroup* this, int, float); // idb TLightGroup* __thiscall TLightGroup::TLightGroup(TLightGroup* this, struct TPinballTable* a2, int a3); TLightGroup* __thiscall TLightGroup::`vector deleting destructor`(TLightGroup *this, char a2); -void* TLightGroup::`vftable` = &TLightGroup::Message; // weak +void* TLightGroup::vftable = &TLightGroup::Message; // weak #endif //PINBALL_TLIGHTGROUP_H diff --git a/guicon.cpp b/guicon.cpp new file mode 100644 index 0000000..1581fd8 --- /dev/null +++ b/guicon.cpp @@ -0,0 +1,57 @@ +#include +#include +#include +#include +#include +#include + +#ifndef _USE_OLD_IOSTREAMS +using namespace std; +#endif + +// maximum mumber of lines the output console should have +static const WORD MAX_CONSOLE_LINES = 500; +#ifdef _DEBUG + +void RedirectIOToConsole() +{ + int hConHandle; + long lStdHandle; + CONSOLE_SCREEN_BUFFER_INFO coninfo; + FILE* fp; + + // allocate a console for this app + AllocConsole(); + + // set the screen buffer to be big enough to let us scroll text + GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &coninfo); + coninfo.dwSize.Y = MAX_CONSOLE_LINES; + SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE), coninfo.dwSize); + + // redirect unbuffered STDOUT to the console + lStdHandle = (long)GetStdHandle(STD_OUTPUT_HANDLE); + hConHandle = _open_osfhandle(lStdHandle, _O_TEXT); + fp = _fdopen(hConHandle, "w"); + *stdout = *fp; + setvbuf(stdout, NULL, _IONBF, 0); + + // redirect unbuffered STDIN to the console + lStdHandle = (long)GetStdHandle(STD_INPUT_HANDLE); + hConHandle = _open_osfhandle(lStdHandle, _O_TEXT); + fp = _fdopen(hConHandle, "r"); + *stdin = *fp; + setvbuf(stdin, NULL, _IONBF, 0); + + // redirect unbuffered STDERR to the console + lStdHandle = (long)GetStdHandle(STD_ERROR_HANDLE); + hConHandle = _open_osfhandle(lStdHandle, _O_TEXT); + fp = _fdopen(hConHandle, "w"); + *stderr = *fp; + setvbuf(stderr, NULL, _IONBF, 0); + + // make cout, wcout, cin, wcin, wcerr, cerr, wclog and clog + // point to console as well + ios::sync_with_stdio(); +} +#endif +//End of File diff --git a/objlist.cpp b/objlist.cpp deleted file mode 100644 index d6b5d36..0000000 --- a/objlist.cpp +++ /dev/null @@ -1,82 +0,0 @@ -#include "pinball.h" - -//----- (01012E51) -------------------------------------------------------- -int __stdcall objlist_add_object(_DWORD *a1, int a2) -{ -int v2; // ecx - -v2 = a1[1]; -if ( v2 >= *a1 ) -return 0; -a1[v2 + 2] = a2; -return ++a1[1]; -} - -//----- (01012E7A) -------------------------------------------------------- -signed int __stdcall objlist_delete_object(int a1, int a2) -{ -int v2; // edx -int v3; // ecx -_DWORD *v4; // esi - -v2 = *(_DWORD *)(a1 + 4); -v3 = v2 - 1; -if ( v2 - 1 < 0 ) -return 0; -v4 = (_DWORD *)(a1 + 4 * v3 + 8); -while ( *v4 != a2 ) -{ ---v3; ---v4; -if ( v3 < 0 ) -return 0; -} -*(_DWORD *)(a1 + 4 * v3 + 8) = *(_DWORD *)(a1 + 4 * v2 + 4); ---*(_DWORD *)(a1 + 4); -return 1; -} - -//----- (01012EBE) -------------------------------------------------------- -_DWORD *__stdcall objlist_new(int a1) -{ -_DWORD *result; // eax - -result = (_DWORD *)memoryallocate(4 * a1 + 12); -if ( result ) -{ -result[1] = 0; -*result = a1; -} -return result; -} - -//----- (01012EE8) -------------------------------------------------------- -int *__stdcall objlist_grow(int *a1, int a2) -{ -int *v2; // esi -int v3; // eax -int *v4; // eax - -v2 = a1; -if ( a1 ) -{ -v3 = a2 + a1[1]; -if ( v3 > *a1 ) -{ -v4 = (int *)memoryrealloc((int)a1, 4 * v3 + 12); -if ( v4 ) -{ -v2 = v4; -*v4 = a2 + v4[1]; -} -} -} -return v2; -} - -//----- (01013C6F) -------------------------------------------------------- -void __stdcall objlist_destroy(int a1) -{ -if ( a1 ) -memoryfree(a1); -} diff --git a/pinball.h b/pinball.h index 424f69f..a3869c0 100644 --- a/pinball.h +++ b/pinball.h @@ -13,8 +13,6 @@ #include #define WIN32_LEAN_AND_MEAN - - #ifndef PINBALL_PINBALL_H #define PINBALL_PINBALL_H @@ -29,6 +27,11 @@ #define __thiscall __cdecl // Test compile in C mode +#ifdef _DEBUG +void RedirectIOToConsole(); +// guicon.cpp +#endif + HDC __stdcall _GetDC(HWND hWnd); HDC __stdcall _BeginPaint(HWND hWnd, LPPAINTSTRUCT lpPaint); CHAR *__stdcall options_path_init(LPCSTR lpString); diff --git a/windows.cpp b/windows.cpp index f2a5f60..3324c06 100644 --- a/windows.cpp +++ b/windows.cpp @@ -19,6 +19,12 @@ int __stdcall WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdL CHAR String1; // [esp+64h] [ebp-ECh] struct tagMSG Dest; // [esp+12Ch] [ebp-24h] +#ifdef _DEBUG + + RedirectIOToConsole(); + +#endif + memory_init((int)winmain_memalloc_failure); ++memory_critical_allocation; options_path_init(get_rc_string(165, 0));