1
0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-06-24 13:38:29 +02:00

Remove commented-out code from Graphics.cpp and GraphicsUtil.cpp

This is pretty old commented-out code from earlier versions of the game;
they are no longer useful, and are just distracting. If we need them, we
can always refer back to this commit (but I sincerely doubt that we'll
need them).
This commit is contained in:
Misa 2021-02-25 15:24:53 -08:00 committed by Ethan Lee
parent 6a3a1fe147
commit 994f47e7d8
2 changed files with 0 additions and 51 deletions

View File

@ -524,16 +524,6 @@ void Graphics::bigprint( int _x, int _y, std::string _s, int r, int g, int b, b
while (iter != _s.end()) {
curr = utf8::unchecked::next(iter);
/*
point tpoint;
tpoint.x = _x + bfontpos;
tpoint.y = _y;
SDL_Rect fontRect = bfont_rect;
fontRect.x = tpoint.x ;
fontRect.y = tpoint.y ;
*/
idx = font_idx(curr);
if (INBOUNDS_VEC(idx, font))
{
@ -2833,9 +2823,6 @@ void Graphics::menuoffrender(void)
int usethisoffset = lerp(oldmenuoffset, menuoffset);
if(flipmode)
{
// flipmatrix.translate(0, menuoffset);
// screenbuffer.draw(backbuffer, flipmatrix);
// flipmatrix.translate(0, -menuoffset);
SDL_Surface* tempbufferFlipped = FlipSurfaceVerticle(tempBuffer);
//put the stored backbuffer in the backbuffer.
SDL_FillRect(backBuffer, NULL, 0x00000000);
@ -2981,11 +2968,6 @@ void Graphics::screenshake(void)
{
if(flipmode)
{
// tpoint.x = int((Math.random() * 7) - 4); tpoint.y = int((Math.random() * 7) - 4);
// flipmatrix.translate(tpoint.x, tpoint.y);
// screenbuffer.draw(backbuffer, flipmatrix);
// flipmatrix.translate(-tpoint.x, -tpoint.y);
SDL_Rect shakeRect;
setRect(shakeRect,screenshake_x, screenshake_y, backBuffer->w, backBuffer->h);
SDL_Surface* flipBackBuffer = FlipSurfaceVerticle(backBuffer);
@ -2994,10 +2976,6 @@ void Graphics::screenshake(void)
}
else
{
//FillRect(screenbuffer, 0x000);
//SDL_Rect rect;
//setRect(rect, blackBars/2, 0, screenbuffer->w, screenbuffer->h);
//SDL_BlitSurface(backBuffer, NULL, screenbuffer, &rect);
SDL_Rect shakeRect;
setRect(shakeRect,screenshake_x, screenshake_y, backBuffer->w, backBuffer->h);
screenbuffer->UpdateScreen( backBuffer, &shakeRect);
@ -3022,8 +3000,6 @@ void Graphics::render(void)
{
SDL_Rect rect;
setRect(rect, 0, 0, backBuffer->w, backBuffer->h);
//setRect(rect, 0, 0, backBuffer->w, backBuffer->h);
//SDL_BlitSurface(backBuffer, NULL, screenbuffer, &rect);
SDL_Surface* tempsurface = FlipSurfaceVerticle(backBuffer);
if(tempsurface != NULL)
{
@ -3035,8 +3011,6 @@ void Graphics::render(void)
{
SDL_Rect rect;
setRect(rect, 0, 0, backBuffer->w, backBuffer->h);
//setRect(rect, 0, 0, backBuffer->w, backBuffer->h);
//SDL_BlitSurface(backBuffer, NULL, screenbuffer, &rect);
screenbuffer->UpdateScreen( backBuffer, &rect);
}
}

View File

@ -31,9 +31,6 @@ SDL_Surface* GetSubSurface( SDL_Surface* metaSurface, int x, int y, int width, i
metaSurface->format->Bmask,
metaSurface->format->Amask
);
//SDL_Surface* subSurface = SDL_DisplayFormatAlpha(preSurface);
//SDL_FreeSurface(preSurface);
// Lastly, apply the area from the meta _surface onto the whole of the sub _surface.
SDL_BlitSurface(metaSurface, &area, preSurface, 0);
@ -130,9 +127,6 @@ SDL_Surface * ScaleSurface( SDL_Surface *_surface, int Width, int Height, SDL_Su
SDL_FillRect(_ret, &gigantoPixel, ReadPixel(_surface, x, y));
}
// DrawPixel(_ret, static_cast<Sint32>(_stretch_factor_x * x) + o_x,
//static_cast<Sint32>(_stretch_factor_y * y) + o_y, ReadPixel(_surface, x, y));
return _ret;
}
@ -160,25 +154,7 @@ SDL_Surface * FlipSurfaceVerticle(SDL_Surface* _src)
void BlitSurfaceStandard( SDL_Surface* _src, SDL_Rect* _srcRect, SDL_Surface* _dest, SDL_Rect* _destRect )
{
//SDL_Rect tempRect = *_destRect;
//tempRect.w ;
//tempRect.h ;
//tempRect.x *=globalScale;
//tempRect.y *=globalScale;
//if(globalScale != 1)
//{
// SDL_Surface* tempScaled = ScaleSurface(_src, tempRect.w, tempRect.h);
// SDL_BlitSurface( tempScaled, _srcRect, _dest, &tempRect );
// SDL_FreeSurface(tempScaled);
//}
//else
//{
SDL_BlitSurface( _src, _srcRect, _dest, _destRect );
//}
}
void BlitSurfaceColoured(
@ -191,7 +167,6 @@ void BlitSurfaceColoured(
SDL_Rect *tempRect = _destRect;
const SDL_PixelFormat& fmt = *(_src->format);
// const SDL_PixelFormat& destfmt = *(_dest->format);
SDL_Surface* tempsurface = SDL_CreateRGBSurface(
SDL_SWSURFACE,