Fixed uninitialized memory.
This commit is contained in:
1 parent
8b1f6f4cfa
commit
d267fd5c98
5 files changed
+9
-2
No files matched your search
@@ -17,6 +17,8 @@ TPinballComponent::TPinballComponent(TPinballTable* table, int groupIndex, bool
|
||||
RenderSprite = nullptr;
|
||||
ListBitmap = nullptr;
|
||||
ListZMap = nullptr;
|
||||
GroupName = nullptr;
|
||||
Control = nullptr;
|
||||
if (table)
|
||||
table->ComponentList->Add(this);
|
||||
if (groupIndex >= 0)
|
||||
@@ -64,7 +66,7 @@ TPinballComponent::TPinballComponent(TPinballTable* table, int groupIndex, bool
|
||||
}
|
||||
|
||||
RenderSprite = render::create_sprite(
|
||||
visualCount > 0 ? VisualType::Sprite :VisualType::None,
|
||||
visualCount > 0 ? VisualType::Sprite : VisualType::None,
|
||||
rootBmp,
|
||||
zMap,
|
||||
rootBmp->XPosition - table->XOffset,
|
||||
|
||||
@@ -60,6 +60,7 @@ TPinballTable::TPinballTable(): TPinballComponent(nullptr, -1, false)
|
||||
ReplayTimer = 0;
|
||||
TiltTimeoutTimer = 0;
|
||||
MultiballFlag = 0;
|
||||
PlayerCount = 0;
|
||||
|
||||
auto ballObj = new TBall(this);
|
||||
BallList->Add(ballObj);
|
||||
|
||||
@@ -231,6 +231,7 @@ render_sprite_type_struct* render::create_sprite(VisualType visualType, gdrv_bit
|
||||
sprite->UnknownFlag = 0;
|
||||
sprite->SpriteArray = nullptr;
|
||||
sprite->SpriteCount = 0;
|
||||
sprite->DirtyRect = rectangle_type{};
|
||||
if (rect)
|
||||
{
|
||||
sprite->BoundingRect = *rect;
|
||||
|
||||
Reference in new issue
Block a user