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