mirror of
https://github.com/k4zmu2a/SpaceCadetPinball.git
synced 2023-12-30 21:52:56 +00:00
Fixed uninitialized memory.
This commit is contained in:
parent
8b1f6f4cfa
commit
d267fd5c98
1
.gitignore
vendored
1
.gitignore
vendored
@ -261,3 +261,4 @@ __pycache__/
|
|||||||
*.pyc
|
*.pyc
|
||||||
/Ida
|
/Ida
|
||||||
/Export
|
/Export
|
||||||
|
/DrMem
|
||||||
|
@ -1 +1,3 @@
|
|||||||
cl /Zi /MT /EHsc /O y- /Ob0 /Femyapp.exe *.cpp user32.lib
|
rc /Fo.\DrMem\SpaceCadetPinball.res ".\SpaceCadetPinball\SpaceCadetPinball.rc"
|
||||||
|
|
||||||
|
cl /Zi /MT /EHsc /O /Ob0 /cgthreads4 /Fo.\DrMem\ /Fe.\DrMem\myapp.exe ".\SpaceCadetPinball\*.cpp" Comctl32.lib Winmm.lib Htmlhelp.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ".\DrMem\SpaceCadetPinball.res"
|
@ -17,6 +17,8 @@ TPinballComponent::TPinballComponent(TPinballTable* table, int groupIndex, bool
|
|||||||
RenderSprite = nullptr;
|
RenderSprite = nullptr;
|
||||||
ListBitmap = nullptr;
|
ListBitmap = nullptr;
|
||||||
ListZMap = nullptr;
|
ListZMap = nullptr;
|
||||||
|
GroupName = nullptr;
|
||||||
|
Control = nullptr;
|
||||||
if (table)
|
if (table)
|
||||||
table->ComponentList->Add(this);
|
table->ComponentList->Add(this);
|
||||||
if (groupIndex >= 0)
|
if (groupIndex >= 0)
|
||||||
@ -64,7 +66,7 @@ TPinballComponent::TPinballComponent(TPinballTable* table, int groupIndex, bool
|
|||||||
}
|
}
|
||||||
|
|
||||||
RenderSprite = render::create_sprite(
|
RenderSprite = render::create_sprite(
|
||||||
visualCount > 0 ? VisualType::Sprite :VisualType::None,
|
visualCount > 0 ? VisualType::Sprite : VisualType::None,
|
||||||
rootBmp,
|
rootBmp,
|
||||||
zMap,
|
zMap,
|
||||||
rootBmp->XPosition - table->XOffset,
|
rootBmp->XPosition - table->XOffset,
|
||||||
|
@ -60,6 +60,7 @@ TPinballTable::TPinballTable(): TPinballComponent(nullptr, -1, false)
|
|||||||
ReplayTimer = 0;
|
ReplayTimer = 0;
|
||||||
TiltTimeoutTimer = 0;
|
TiltTimeoutTimer = 0;
|
||||||
MultiballFlag = 0;
|
MultiballFlag = 0;
|
||||||
|
PlayerCount = 0;
|
||||||
|
|
||||||
auto ballObj = new TBall(this);
|
auto ballObj = new TBall(this);
|
||||||
BallList->Add(ballObj);
|
BallList->Add(ballObj);
|
||||||
|
@ -231,6 +231,7 @@ render_sprite_type_struct* render::create_sprite(VisualType visualType, gdrv_bit
|
|||||||
sprite->UnknownFlag = 0;
|
sprite->UnknownFlag = 0;
|
||||||
sprite->SpriteArray = nullptr;
|
sprite->SpriteArray = nullptr;
|
||||||
sprite->SpriteCount = 0;
|
sprite->SpriteCount = 0;
|
||||||
|
sprite->DirtyRect = rectangle_type{};
|
||||||
if (rect)
|
if (rect)
|
||||||
{
|
{
|
||||||
sprite->BoundingRect = *rect;
|
sprite->BoundingRect = *rect;
|
||||||
|
Loading…
Reference in New Issue
Block a user