1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49:43 +01:00

Simplify initializations

This is similar to what was reverted in 3011911 but this time should use
syntax available even before C++11, tested on Clang with
`-std=c++98 -Wall -pedantic`.
This commit is contained in:
Marvin Scholz 2020-01-12 18:26:00 +01:00 committed by Ethan Lee
parent ec23e4a540
commit f1f5acc552

View file

@ -88,32 +88,26 @@ Graphics::Graphics()
resumegamemode = false;
//Textboxes!
for (int i = 0; i < 30; i++)
{
textboxclass t;
textbox.push_back(t);
}
textbox.resize(30);
ntextbox = 0;
//Fading stuff
for (int i = 0; i < 15; i++)
{
fadebars.push_back(0);
}
fadebars.resize(15);
fadeamount = 0;
fademode = 0;
// initialize everything else to zero
backBuffer = NULL;
backboxrect.x = 0, backboxrect.y = 0, backboxrect.w = 0, backboxrect.h = 0;
backboxrect = SDL_Rect();
bcol = 0;
bcol2 = 0;
ct.colour = 0;
foot_rect.x = 0, foot_rect.y = 0, foot_rect.w = 0, foot_rect.h = 0;
ct = colourTransform();
foot_rect = SDL_Rect();
foregrounddrawn = false;
foregroundBuffer = NULL;
backgrounddrawn = false;
images_rect.x = 0, images_rect.y = 0, images_rect.w = 0, images_rect.h = 0;
images_rect = SDL_Rect();
j = 0;
k = 0;
m = 0;
@ -121,12 +115,12 @@ Graphics::Graphics()
menubuffer = NULL;
screenbuffer = NULL;
tempBuffer = NULL;
tl.x = 0, tl.y = 0;
tl = point();
towerbuffer = NULL;
trinketr = 0;
trinketg = 0;
trinketb = 0;
warprect.x = 0, warprect.y = 0, warprect.w = 0, warprect.h = 0;
warprect = SDL_Rect();
}
Graphics::~Graphics()