Correct inheritance for TPinballComponent, TCollisionComponent.

This commit is contained in:
oz 2020-11-28 15:59:42 +03:00
parent a1678120f8
commit 62a63bbf2e
33 changed files with 282 additions and 252 deletions

View File

@ -26,6 +26,8 @@ int main()
auto dib = gdrv::DibCreate(8, 1, 1);
gdrv::DibSetUsage(dib, 0, 1);
render::init(0, 1, 2, 800, 600);
objlist_class d = objlist_class(2, 4);
for (int i = 0; i < 100; i++)
{

View File

@ -203,6 +203,7 @@
<ClInclude Include="TTextBox.h" />
<ClInclude Include="TTimer.h" />
<ClInclude Include="TTripwire.h" />
<ClInclude Include="TWall.h" />
<ClInclude Include="TZmapList.h" />
<ClInclude Include="winmain.h" />
<ClInclude Include="zdrv.h" />
@ -263,6 +264,7 @@
<ClCompile Include="TTextBox.cpp" />
<ClCompile Include="TTimer.cpp" />
<ClCompile Include="TTripwire.cpp" />
<ClCompile Include="TWall.cpp" />
<ClCompile Include="winmain.cpp" />
<ClCompile Include="zdrv.cpp" />
</ItemGroup>

View File

@ -13,12 +13,6 @@
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
<Filter Include="Header Files\PinballComponents">
<UniqueIdentifier>{9ee086c2-1a95-48fb-92d8-4b7e7f6682ff}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\PinballComponents">
<UniqueIdentifier>{33813da8-81ac-449c-b19a-9756272519b9}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files\TEdgeSegment">
<UniqueIdentifier>{0aa40751-a44a-400e-8809-ee817161e8e0}</UniqueIdentifier>
</Filter>
@ -31,6 +25,12 @@
<Filter Include="Header Files\TCollisionComponent">
<UniqueIdentifier>{7ed2796a-da4b-4edd-8783-53e45d8d1c88}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files\TPinballComponent">
<UniqueIdentifier>{9ee086c2-1a95-48fb-92d8-4b7e7f6682ff}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\TPinballComponent">
<UniqueIdentifier>{33813da8-81ac-449c-b19a-9756272519b9}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="pch.h">
@ -54,101 +54,38 @@
<ClInclude Include="score.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="TDrain.h">
<Filter>Header Files\PinballComponents</Filter>
</ClInclude>
<ClInclude Include="TFlipper.h">
<Filter>Header Files\PinballComponents</Filter>
</ClInclude>
<ClInclude Include="TPinballComponent.h">
<Filter>Header Files\PinballComponents</Filter>
</ClInclude>
<ClInclude Include="TPinballTable.h">
<Filter>Header Files\PinballComponents</Filter>
</ClInclude>
<ClInclude Include="TPlunger.h">
<Filter>Header Files\PinballComponents</Filter>
<Filter>Header Files\TPinballComponent</Filter>
</ClInclude>
<ClInclude Include="TBall.h">
<Filter>Header Files\PinballComponents</Filter>
<Filter>Header Files\TPinballComponent</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="TBlocker.h">
<Filter>Header Files\PinballComponents</Filter>
</ClInclude>
<ClInclude Include="TBumper.h">
<Filter>Header Files\PinballComponents</Filter>
</ClInclude>
<ClInclude Include="TComponentGroup.h">
<Filter>Header Files\PinballComponents</Filter>
</ClInclude>
<ClInclude Include="TDemo.h">
<Filter>Header Files\PinballComponents</Filter>
</ClInclude>
<ClInclude Include="TFlagSpinner.h">
<Filter>Header Files\PinballComponents</Filter>
</ClInclude>
<ClInclude Include="TGate.h">
<Filter>Header Files\PinballComponents</Filter>
</ClInclude>
<ClInclude Include="THole.h">
<Filter>Header Files\PinballComponents</Filter>
</ClInclude>
<ClInclude Include="TKickback.h">
<Filter>Header Files\PinballComponents</Filter>
</ClInclude>
<ClInclude Include="TKickout.h">
<Filter>Header Files\PinballComponents</Filter>
<Filter>Header Files\TPinballComponent</Filter>
</ClInclude>
<ClInclude Include="TLight.h">
<Filter>Header Files\PinballComponents</Filter>
<Filter>Header Files\TPinballComponent</Filter>
</ClInclude>
<ClInclude Include="TLightBargraph.h">
<Filter>Header Files\PinballComponents</Filter>
<Filter>Header Files\TPinballComponent</Filter>
</ClInclude>
<ClInclude Include="TLightGroup.h">
<Filter>Header Files\PinballComponents</Filter>
</ClInclude>
<ClInclude Include="TLightRollover.h">
<Filter>Header Files\PinballComponents</Filter>
</ClInclude>
<ClInclude Include="TOneway.h">
<Filter>Header Files\PinballComponents</Filter>
</ClInclude>
<ClInclude Include="TPopupTarget.h">
<Filter>Header Files\PinballComponents</Filter>
</ClInclude>
<ClInclude Include="TRamp.h">
<Filter>Header Files\PinballComponents</Filter>
</ClInclude>
<ClInclude Include="TRollover.h">
<Filter>Header Files\PinballComponents</Filter>
</ClInclude>
<ClInclude Include="TSink.h">
<Filter>Header Files\PinballComponents</Filter>
</ClInclude>
<ClInclude Include="TSoloTarget.h">
<Filter>Header Files\PinballComponents</Filter>
<Filter>Header Files\TPinballComponent</Filter>
</ClInclude>
<ClInclude Include="TSound.h">
<Filter>Header Files\PinballComponents</Filter>
</ClInclude>
<ClInclude Include="TTableLayer.h">
<Filter>Header Files\PinballComponents</Filter>
<Filter>Header Files\TPinballComponent</Filter>
</ClInclude>
<ClInclude Include="TTextBox.h">
<Filter>Header Files\PinballComponents</Filter>
<Filter>Header Files\TPinballComponent</Filter>
</ClInclude>
<ClInclude Include="TTimer.h">
<Filter>Header Files\PinballComponents</Filter>
</ClInclude>
<ClInclude Include="TTripwire.h">
<Filter>Header Files\PinballComponents</Filter>
<Filter>Header Files\TPinballComponent</Filter>
</ClInclude>
<ClInclude Include="TZmapList.h">
<Filter>Header Files\PinballComponents</Filter>
<Filter>Header Files\TPinballComponent</Filter>
</ClInclude>
<ClInclude Include="memory.h">
<Filter>Header Files</Filter>
@ -192,6 +129,72 @@
<ClInclude Include="TLine.h">
<Filter>Header Files\TEdgeSegment</Filter>
</ClInclude>
<ClInclude Include="TWall.h">
<Filter>Header Files\TCollisionComponent</Filter>
</ClInclude>
<ClInclude Include="TBumper.h">
<Filter>Header Files\TCollisionComponent</Filter>
</ClInclude>
<ClInclude Include="TBlocker.h">
<Filter>Header Files\TCollisionComponent</Filter>
</ClInclude>
<ClInclude Include="TDemo.h">
<Filter>Header Files\TCollisionComponent</Filter>
</ClInclude>
<ClInclude Include="TDrain.h">
<Filter>Header Files\TCollisionComponent</Filter>
</ClInclude>
<ClInclude Include="TFlagSpinner.h">
<Filter>Header Files\TCollisionComponent</Filter>
</ClInclude>
<ClInclude Include="TFlipper.h">
<Filter>Header Files\TCollisionComponent</Filter>
</ClInclude>
<ClInclude Include="TGate.h">
<Filter>Header Files\TCollisionComponent</Filter>
</ClInclude>
<ClInclude Include="THole.h">
<Filter>Header Files\TCollisionComponent</Filter>
</ClInclude>
<ClInclude Include="TKickback.h">
<Filter>Header Files\TCollisionComponent</Filter>
</ClInclude>
<ClInclude Include="TKickout.h">
<Filter>Header Files\TCollisionComponent</Filter>
</ClInclude>
<ClInclude Include="TOneway.h">
<Filter>Header Files\TCollisionComponent</Filter>
</ClInclude>
<ClInclude Include="TPlunger.h">
<Filter>Header Files\TCollisionComponent</Filter>
</ClInclude>
<ClInclude Include="TPopupTarget.h">
<Filter>Header Files\TCollisionComponent</Filter>
</ClInclude>
<ClInclude Include="TRamp.h">
<Filter>Header Files\TCollisionComponent</Filter>
</ClInclude>
<ClInclude Include="TRollover.h">
<Filter>Header Files\TCollisionComponent</Filter>
</ClInclude>
<ClInclude Include="TSink.h">
<Filter>Header Files\TCollisionComponent</Filter>
</ClInclude>
<ClInclude Include="TSoloTarget.h">
<Filter>Header Files\TCollisionComponent</Filter>
</ClInclude>
<ClInclude Include="TTableLayer.h">
<Filter>Header Files\TCollisionComponent</Filter>
</ClInclude>
<ClInclude Include="TPinballTable.h">
<Filter>Header Files\TPinballComponent</Filter>
</ClInclude>
<ClInclude Include="TTripwire.h">
<Filter>Header Files\TCollisionComponent</Filter>
</ClInclude>
<ClInclude Include="TLightRollover.h">
<Filter>Header Files\TCollisionComponent</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="pch.cpp">
@ -218,95 +221,35 @@
<ClCompile Include="score.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="TDrain.cpp">
<Filter>Source Files\PinballComponents</Filter>
</ClCompile>
<ClCompile Include="TFlipper.cpp">
<Filter>Source Files\PinballComponents</Filter>
</ClCompile>
<ClCompile Include="TPinballComponent.cpp">
<Filter>Source Files\PinballComponents</Filter>
<Filter>Source Files\TPinballComponent</Filter>
</ClCompile>
<ClCompile Include="TPinballTable.cpp">
<Filter>Source Files\PinballComponents</Filter>
</ClCompile>
<ClCompile Include="TPlunger.cpp">
<Filter>Source Files\PinballComponents</Filter>
<Filter>Source Files\TPinballComponent</Filter>
</ClCompile>
<ClCompile Include="TBall.cpp">
<Filter>Source Files\PinballComponents</Filter>
</ClCompile>
<ClCompile Include="TBlocker.cpp">
<Filter>Source Files\PinballComponents</Filter>
</ClCompile>
<ClCompile Include="TBumper.cpp">
<Filter>Source Files\PinballComponents</Filter>
<Filter>Source Files\TPinballComponent</Filter>
</ClCompile>
<ClCompile Include="TComponentGroup.cpp">
<Filter>Source Files\PinballComponents</Filter>
</ClCompile>
<ClCompile Include="TDemo.cpp">
<Filter>Source Files\PinballComponents</Filter>
</ClCompile>
<ClCompile Include="TFlagSpinner.cpp">
<Filter>Source Files\PinballComponents</Filter>
</ClCompile>
<ClCompile Include="TGate.cpp">
<Filter>Source Files\PinballComponents</Filter>
</ClCompile>
<ClCompile Include="THole.cpp">
<Filter>Source Files\PinballComponents</Filter>
</ClCompile>
<ClCompile Include="TKickback.cpp">
<Filter>Source Files\PinballComponents</Filter>
</ClCompile>
<ClCompile Include="TKickout.cpp">
<Filter>Source Files\PinballComponents</Filter>
<Filter>Source Files\TPinballComponent</Filter>
</ClCompile>
<ClCompile Include="TLight.cpp">
<Filter>Source Files\PinballComponents</Filter>
<Filter>Source Files\TPinballComponent</Filter>
</ClCompile>
<ClCompile Include="TLightBargraph.cpp">
<Filter>Source Files\PinballComponents</Filter>
<Filter>Source Files\TPinballComponent</Filter>
</ClCompile>
<ClCompile Include="TLightGroup.cpp">
<Filter>Source Files\PinballComponents</Filter>
</ClCompile>
<ClCompile Include="TLightRollover.cpp">
<Filter>Source Files\PinballComponents</Filter>
</ClCompile>
<ClCompile Include="TOneway.cpp">
<Filter>Source Files\PinballComponents</Filter>
</ClCompile>
<ClCompile Include="TPopupTarget.cpp">
<Filter>Source Files\PinballComponents</Filter>
</ClCompile>
<ClCompile Include="TRamp.cpp">
<Filter>Source Files\PinballComponents</Filter>
</ClCompile>
<ClCompile Include="TRollover.cpp">
<Filter>Source Files\PinballComponents</Filter>
</ClCompile>
<ClCompile Include="TSink.cpp">
<Filter>Source Files\PinballComponents</Filter>
</ClCompile>
<ClCompile Include="TSoloTarget.cpp">
<Filter>Source Files\PinballComponents</Filter>
<Filter>Source Files\TPinballComponent</Filter>
</ClCompile>
<ClCompile Include="TSound.cpp">
<Filter>Source Files\PinballComponents</Filter>
</ClCompile>
<ClCompile Include="TTableLayer.cpp">
<Filter>Source Files\PinballComponents</Filter>
<Filter>Source Files\TPinballComponent</Filter>
</ClCompile>
<ClCompile Include="TTextBox.cpp">
<Filter>Source Files\PinballComponents</Filter>
<Filter>Source Files\TPinballComponent</Filter>
</ClCompile>
<ClCompile Include="TTimer.cpp">
<Filter>Source Files\PinballComponents</Filter>
</ClCompile>
<ClCompile Include="TTripwire.cpp">
<Filter>Source Files\PinballComponents</Filter>
<Filter>Source Files\TPinballComponent</Filter>
</ClCompile>
<ClCompile Include="memory.cpp">
<Filter>Source Files</Filter>
@ -350,6 +293,69 @@
<ClCompile Include="TLine.cpp">
<Filter>Source Files\TEdgeSegment</Filter>
</ClCompile>
<ClCompile Include="TWall.cpp">
<Filter>Source Files\TCollisionComponent</Filter>
</ClCompile>
<ClCompile Include="TBlocker.cpp">
<Filter>Source Files\TCollisionComponent</Filter>
</ClCompile>
<ClCompile Include="TBumper.cpp">
<Filter>Source Files\TCollisionComponent</Filter>
</ClCompile>
<ClCompile Include="TDemo.cpp">
<Filter>Source Files\TCollisionComponent</Filter>
</ClCompile>
<ClCompile Include="TDrain.cpp">
<Filter>Source Files\TCollisionComponent</Filter>
</ClCompile>
<ClCompile Include="TFlagSpinner.cpp">
<Filter>Source Files\TCollisionComponent</Filter>
</ClCompile>
<ClCompile Include="TFlipper.cpp">
<Filter>Source Files\TCollisionComponent</Filter>
</ClCompile>
<ClCompile Include="TGate.cpp">
<Filter>Source Files\TCollisionComponent</Filter>
</ClCompile>
<ClCompile Include="THole.cpp">
<Filter>Source Files\TCollisionComponent</Filter>
</ClCompile>
<ClCompile Include="TKickback.cpp">
<Filter>Source Files\TCollisionComponent</Filter>
</ClCompile>
<ClCompile Include="TKickout.cpp">
<Filter>Source Files\TCollisionComponent</Filter>
</ClCompile>
<ClCompile Include="TOneway.cpp">
<Filter>Source Files\TCollisionComponent</Filter>
</ClCompile>
<ClCompile Include="TPlunger.cpp">
<Filter>Source Files\TCollisionComponent</Filter>
</ClCompile>
<ClCompile Include="TPopupTarget.cpp">
<Filter>Source Files\TCollisionComponent</Filter>
</ClCompile>
<ClCompile Include="TRamp.cpp">
<Filter>Source Files\TCollisionComponent</Filter>
</ClCompile>
<ClCompile Include="TRollover.cpp">
<Filter>Source Files\TCollisionComponent</Filter>
</ClCompile>
<ClCompile Include="TSink.cpp">
<Filter>Source Files\TCollisionComponent</Filter>
</ClCompile>
<ClCompile Include="TSoloTarget.cpp">
<Filter>Source Files\TCollisionComponent</Filter>
</ClCompile>
<ClCompile Include="TTableLayer.cpp">
<Filter>Source Files\TCollisionComponent</Filter>
</ClCompile>
<ClCompile Include="TTripwire.cpp">
<Filter>Source Files\TCollisionComponent</Filter>
</ClCompile>
<ClCompile Include="TLightRollover.cpp">
<Filter>Source Files\TCollisionComponent</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<Natvis Include="NatvisFile.natvis" />

View File

@ -1,11 +1,11 @@
#pragma once
#include "TPinballComponent.h"
#include "TCollisionComponent.h"
class TBlocker :
public TPinballComponent
public TCollisionComponent
{
public:
TBlocker(TPinballTable* table, int groupIndex) : TPinballComponent(table, groupIndex, false)
TBlocker(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, true)
{
}
};

View File

@ -1,11 +1,11 @@
#pragma once
#include "TPinballComponent.h"
#include "TCollisionComponent.h"
class TBumper :
public TPinballComponent
public TCollisionComponent
{
public:
TBumper(TPinballTable* table, int groupIndex) : TPinballComponent(table, groupIndex, false)
TBumper(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, true)
{
}
};

View File

@ -5,7 +5,7 @@
#include "TPinballTable.h"
TCollisionComponent::TCollisionComponent(TPinballTable* table, int groupIndex, int someFlag) : TPinballComponent(
TCollisionComponent::TCollisionComponent(TPinballTable* table, int groupIndex, bool createWall) : TPinballComponent(
table, groupIndex, true)
{
visualStruct visual{};
@ -21,9 +21,9 @@ TCollisionComponent::TCollisionComponent(TPinballTable* table, int groupIndex, i
else
{
loader::query_visual(groupIndex, 0, &visual);
if (someFlag)
if (createWall)
{
float offset = table->UnknownP61F;
float offset = table->CollisionCompOffset;
float* floatArr = loader::query_float_attribute(groupIndex, 0, 600);
TEdgeSegment::install_wall(floatArr, this, &UnknownBaseFlag2, visual.Flag, offset, 0);
}

View File

@ -15,6 +15,6 @@ public:
int SoundIndex2;
int SoundIndex1;
TCollisionComponent(TPinballTable* table, int groupIndex, int someFlag);
TCollisionComponent(TPinballTable* table, int groupIndex, bool createWall);
~TCollisionComponent();
};

View File

@ -1,11 +1,11 @@
#pragma once
#include "TPinballComponent.h"
#include "TCollisionComponent.h"
class TDemo :
public TPinballComponent
public TCollisionComponent
{
public:
TDemo(TPinballTable* table, int groupIndex) : TPinballComponent(table, groupIndex, false)
TDemo(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, false)
{
}
};

View File

@ -1,11 +1,11 @@
#pragma once
#include "TPinballComponent.h"
#include "TCollisionComponent.h"
class TDrain :
public TPinballComponent
public TCollisionComponent
{
public:
TDrain(TPinballTable* table, int groupIndex) : TPinballComponent(table, groupIndex, false)
TDrain(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, true)
{
}
};

View File

@ -16,18 +16,18 @@ TEdgeSegment* TEdgeSegment::install_wall(float* floatArr, TCollisionComponent* c
float offset, int someValue)
{
vector_type center{}, start{}, end{}, prevCenter{}, vec1{}, vec2{}, dstVec{};
TEdgeSegment* edge1;
TEdgeSegment* edge = nullptr;
wall_type wallType = static_cast<wall_type>(static_cast<int>(floor(*floatArr) - 1.0));
wall_type wallType = static_cast<wall_type>(static_cast<int>(floor(*floatArr) - 1.0f));
switch (wallType)
{
case wall_type::Circle:
{
center.X = floatArr[1];
center.Y = floatArr[2];
auto radius = offset + floatArr[3];
auto circle = new TCircle(collComp, flagPtr, visual_flag, &center, radius);
edge = circle;
if (circle)
{
@ -36,7 +36,7 @@ TEdgeSegment* TEdgeSegment::install_wall(float* floatArr, TCollisionComponent* c
}
collComp->EdgeList->Add(circle);
return circle;
break;
}
case wall_type::Line:
{
@ -44,8 +44,8 @@ TEdgeSegment* TEdgeSegment::install_wall(float* floatArr, TCollisionComponent* c
start.Y = floatArr[2];
end.X = floatArr[3];
end.Y = floatArr[4];
auto line = new TLine(collComp, flagPtr, visual_flag, &start, &end);
edge = line;
if (line)
{
@ -54,7 +54,7 @@ TEdgeSegment* TEdgeSegment::install_wall(float* floatArr, TCollisionComponent* c
line->place_in_grid();
collComp->EdgeList->Add(line);
}
return line;
break;
}
default:
{
@ -91,7 +91,7 @@ TEdgeSegment* TEdgeSegment::install_wall(float* floatArr, TCollisionComponent* c
if (dstVec.Z > 0.0 && offset > 0.0 ||
dstVec.Z < 0.0 && offset < 0.0)
{
auto radius = offset * 1.001;
float radius = offset * 1.001f;
auto circle = new TCircle(collComp, flagPtr, visual_flag, &center, radius);
if (circle)
@ -108,6 +108,8 @@ TEdgeSegment* TEdgeSegment::install_wall(float* floatArr, TCollisionComponent* c
end.X = floatArrPtr[2];
end.Y = floatArrPtr[3];
auto line = new TLine(collComp, flagPtr, visual_flag, &start, &end);
edge = line;
if (line)
{
line->WallValue = someValue;
@ -121,5 +123,5 @@ TEdgeSegment* TEdgeSegment::install_wall(float* floatArr, TCollisionComponent* c
}
}
return nullptr;
return edge;
}

View File

@ -3,7 +3,7 @@
#include "maths.h"
#include "TBall.h"
enum class wall_type
enum class wall_type : int
{
Circle = 0,
Line = 1,

View File

@ -1,11 +1,11 @@
#pragma once
#include "TPinballComponent.h"
#include "TCollisionComponent.h"
class TFlagSpinner :
public TPinballComponent
public TCollisionComponent
{
public:
TFlagSpinner(TPinballTable* table, int groupIndex) : TPinballComponent(table, groupIndex, false)
TFlagSpinner(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, false)
{
}
};

View File

@ -1,12 +1,11 @@
#pragma once
#include "TPinballComponent.h"
#include "TCollisionComponent.h"
class TFlipper :
public TPinballComponent
public TCollisionComponent
{
public:
TFlipper(TPinballTable* table, int groupIndex) : TPinballComponent(table, groupIndex, false)
TFlipper(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, false)
{
}
};

View File

@ -1,11 +1,11 @@
#pragma once
#include "TPinballComponent.h"
#include "TCollisionComponent.h"
class TGate :
public TPinballComponent
public TCollisionComponent
{
public:
TGate(TPinballTable* table, int groupIndex) : TPinballComponent(table, groupIndex, false)
TGate(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, true)
{
}
};

View File

@ -1,11 +1,11 @@
#pragma once
#include "TPinballComponent.h"
#include "TCollisionComponent.h"
class THole :
public TPinballComponent
public TCollisionComponent
{
public:
THole(TPinballTable* table, int groupIndex) : TPinballComponent(table, groupIndex, false)
THole(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, false)
{
}
};

View File

@ -1,11 +1,11 @@
#pragma once
#include "TPinballComponent.h"
#include "TCollisionComponent.h"
class TKickback :
public TPinballComponent
public TCollisionComponent
{
public:
TKickback(TPinballTable* table, int groupIndex) : TPinballComponent(table, groupIndex, false)
TKickback(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, true)
{
}
};

View File

@ -1,11 +1,11 @@
#pragma once
#include "TPinballComponent.h"
#include "TCollisionComponent.h"
class TKickout :
public TPinballComponent
public TCollisionComponent
{
public:
TKickout(TPinballTable* table, int groupIndex,int vectorType) : TPinballComponent(table, groupIndex, false)
TKickout(TPinballTable* table, int groupIndex, int vectorType) : TCollisionComponent(table, groupIndex, false)
{
}
};

View File

@ -1,11 +1,11 @@
#pragma once
#include "TPinballComponent.h"
#include "TLightGroup.h"
class TLightBargraph :
public TPinballComponent
public TLightGroup
{
public:
TLightBargraph(TPinballTable* table, int groupIndex) : TPinballComponent(table, groupIndex, false)
TLightBargraph(TPinballTable* table, int groupIndex) : TLightGroup(table, groupIndex)
{
}
};

View File

@ -1,11 +1,11 @@
#pragma once
#include "TPinballComponent.h"
#include "TRollover.h"
class TLightRollover :
public TPinballComponent
public TRollover
{
public:
TLightRollover(TPinballTable* table, int groupIndex) : TPinballComponent(table, groupIndex, false)
TLightRollover(TPinballTable* table, int groupIndex) : TRollover(table, groupIndex)
{
}
};

View File

@ -1,11 +1,11 @@
#pragma once
#include "TPinballComponent.h"
#include "TCollisionComponent.h"
class TOneway :
public TPinballComponent
public TCollisionComponent
{
public:
TOneway(TPinballTable* table, int groupIndex) : TPinballComponent(table, groupIndex, false)
TOneway(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, false)
{
}
};

View File

@ -30,6 +30,7 @@
#include "TTextBox.h"
#include "TTimer.h"
#include "TTripwire.h"
#include "TWall.h"
TPinballTable::TPinballTable(): TPinballComponent(nullptr, -1, false)
{
@ -88,7 +89,7 @@ TPinballTable::TPinballTable(): TPinballComponent(nullptr, -1, false)
{
case 1000:
case 1010:
// auto wall = new TWall( this, groupIndex);
new TWall( this, groupIndex);
break;
case 1001:
this->Plunger = new TPlunger(this, groupIndex);

View File

@ -73,7 +73,7 @@ public:
int UnknownP58;
int UnknownP59;
int UnknownP60;
float UnknownP61F;
float CollisionCompOffset;
int UnknownP62;
int UnknownP63;
int UnknownP64;

View File

@ -1,11 +1,11 @@
#pragma once
#include "TPinballComponent.h"
#include "TCollisionComponent.h"
class TPlunger :
public TPinballComponent
public TCollisionComponent
{
public:
TPlunger(TPinballTable* table, int groupIndex) : TPinballComponent(table, groupIndex, false)
TPlunger(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, true)
{
}
};

View File

@ -1,11 +1,11 @@
#pragma once
#include "TPinballComponent.h"
#include "TCollisionComponent.h"
class TPopupTarget :
public TPinballComponent
public TCollisionComponent
{
public:
TPopupTarget(TPinballTable* table, int groupIndex) : TPinballComponent(table, groupIndex, false)
TPopupTarget(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, true)
{
}
};

View File

@ -1,11 +1,11 @@
#pragma once
#include "TPinballComponent.h"
#include "TCollisionComponent.h"
class TRamp :
public TPinballComponent
public TCollisionComponent
{
public:
TRamp(TPinballTable* table, int groupIndex) : TPinballComponent(table, groupIndex, false)
TRamp(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, false)
{
}
};

View File

@ -1,11 +1,11 @@
#pragma once
#include "TPinballComponent.h"
#include "TCollisionComponent.h"
class TRollover :
public TPinballComponent
public TCollisionComponent
{
public:
TRollover(TPinballTable* table, int groupIndex) : TPinballComponent(table, groupIndex, false)
TRollover(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, true)
{
}
};

View File

@ -1,11 +1,11 @@
#pragma once
#include "TPinballComponent.h"
#include "TCollisionComponent.h"
class TSink :
public TPinballComponent
public TCollisionComponent
{
public:
TSink(TPinballTable* table, int groupIndex) : TPinballComponent(table, groupIndex, false)
TSink(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, true)
{
}
};

View File

@ -1,11 +1,11 @@
#pragma once
#include "TPinballComponent.h"
#include "TCollisionComponent.h"
class TSoloTarget :
public TPinballComponent
public TCollisionComponent
{
public:
TSoloTarget(TPinballTable* table, int groupIndex) : TPinballComponent(table, groupIndex, false)
TSoloTarget(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, true)
{
}
};

View File

@ -1,11 +1,11 @@
#pragma once
#include "TPinballComponent.h"
#include "TCollisionComponent.h"
class TTableLayer :
public TPinballComponent
public TCollisionComponent
{
public:
TTableLayer(TPinballTable* table) : TPinballComponent(table, -1, false)
TTableLayer(TPinballTable* table) : TCollisionComponent(table, -1, false)
{
}
};

View File

@ -1,11 +1,11 @@
#pragma once
#include "TPinballComponent.h"
#include "TRollover.h"
class TTripwire :
public TPinballComponent
public TRollover
{
public:
TTripwire(TPinballTable* table, int groupIndex) : TPinballComponent(table, groupIndex, false)
TTripwire(TPinballTable* table, int groupIndex) : TRollover(table, groupIndex)
{
}
};

View File

@ -0,0 +1,2 @@
#include "pch.h"
#include "TWall.h"

11
SpaceCadetPinball/TWall.h Normal file
View File

@ -0,0 +1,11 @@
#pragma once
#include "TCollisionComponent.h"
class TWall :
public TCollisionComponent
{
public:
TWall(TPinballTable* table, int groupIndex) : TCollisionComponent(table, groupIndex, true)
{
}
};

View File

@ -1,10 +1,15 @@
#pragma once
#include "objlist_class.h"
class TZmapList :
public objlist_class
class TZmapList : // TImageList, template?
public objlist_class
{
public:
TZmapList(int SizeInt, int growSize):objlist_class(SizeInt,growSize){};
~TZmapList(){};
};
TZmapList(int SizeInt, int growSize): objlist_class(SizeInt, growSize)
{
};
~TZmapList()
{
};
};