redefine vftable as actual member. allocate console for debug purposes

This commit is contained in:
Sydney Biscuit committed 2019-08-18 15:04:12 -07:00
1 parent 7b433f5282
commit 4e5ec98fa6
77 files changed
+348 -280

No files matched your search

+71 -22
View File
@@ -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);
}
+33
View File
@@ -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);
}
+2 -2
View File
@@ -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);
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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
@@ -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;
@@ -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
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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)
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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)
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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)
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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
+31 -46
View File
@@ -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;
+24 -9
View File
@@ -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
+4 -4
View File
@@ -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;
+3 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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)
+1 -1
View File
@@ -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
+4 -4
View File
@@ -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@<ecx>, int a2@<ebx>)
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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
+2 -2
View File
@@ -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)
+1 -1
View File
@@ -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
+57
View File
@@ -0,0 +1,57 @@
#include <windows.h>
#include <stdio.h>
#include <fcntl.h>
#include <io.h>
#include <iostream>
#include <fstream>
#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
-82
View File
@@ -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);
}
+5 -2
View File
@@ -13,8 +13,6 @@
#include <Windows.h>
#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);
+6
View File
@@ -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));