From a399d79f8a3a211b5a2404d4b9ccb5100a8a8ae8 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 18 Mar 2018 14:18:42 +0100 Subject: [PATCH] - minor reformatting. --- src/textures/canvastexture.cpp | 2 +- src/textures/skyboxtexture.cpp | 2 +- src/textures/skyboxtexture.h | 2 +- src/textures/texture.cpp | 12 +++--------- src/textures/textures.h | 9 ++++----- src/textures/warptexture.cpp | 2 +- src/v_font.cpp | 10 +++++----- src/v_video.cpp | 2 +- 8 files changed, 17 insertions(+), 24 deletions(-) diff --git a/src/textures/canvastexture.cpp b/src/textures/canvastexture.cpp index d2530017b..bb6b3d685 100644 --- a/src/textures/canvastexture.cpp +++ b/src/textures/canvastexture.cpp @@ -65,7 +65,7 @@ FCanvasTexture::~FCanvasTexture () Unload (); } -const uint8_t *FCanvasTexture::GetColumn (unsigned int column, const Span **spans_out) +const uint8_t *FCanvasTexture::GetColumn(unsigned int column, const Span **spans_out) { bNeedsUpdate = true; if (Canvas == NULL) diff --git a/src/textures/skyboxtexture.cpp b/src/textures/skyboxtexture.cpp index 9c3b21b67..7f19e7f85 100644 --- a/src/textures/skyboxtexture.cpp +++ b/src/textures/skyboxtexture.cpp @@ -59,7 +59,7 @@ FSkyBox::~FSkyBox() // //----------------------------------------------------------------------------- -const uint8_t *FSkyBox::GetColumn (unsigned int column, const Span **spans_out) +const uint8_t *FSkyBox::GetColumn(unsigned int column, const Span **spans_out) { if (faces[0]) return faces[0]->GetColumn(column, spans_out); return NULL; diff --git a/src/textures/skyboxtexture.h b/src/textures/skyboxtexture.h index 3a4edd042..74fc68bbe 100644 --- a/src/textures/skyboxtexture.h +++ b/src/textures/skyboxtexture.h @@ -17,7 +17,7 @@ public: FSkyBox(); ~FSkyBox(); - const uint8_t *GetColumn (unsigned int column, const Span **spans_out); + const uint8_t *GetColumn(unsigned int column, const Span **spans_out); const uint8_t *GetPixels (); int CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate, FCopyInfo *inf); bool UseBasePalette(); diff --git a/src/textures/texture.cpp b/src/textures/texture.cpp index 154efb222..c81b691c4 100644 --- a/src/textures/texture.cpp +++ b/src/textures/texture.cpp @@ -961,15 +961,9 @@ void FDummyTexture::SetSize (int width, int height) } // This must never be called -const uint8_t *FDummyTexture::GetColumn (unsigned int column, const Span **spans_out) +uint8_t *FDummyTexture::MakeTexture (FRenderStyle) { - return NULL; -} - -// And this also must never be called -const uint8_t *FDummyTexture::GetPixels () -{ - return NULL; + return nullptr; } //========================================================================== @@ -996,7 +990,7 @@ CCMD (printspans) { const FTexture::Span *spans; Printf ("%4d:", x); - tex->GetColumn (x, &spans); + tex->GetColumn(x, &spans); while (spans->Length != 0) { Printf (" (%4d,%4d)", spans->TopOffset, spans->TopOffset+spans->Length-1); diff --git a/src/textures/textures.h b/src/textures/textures.h index 675a9d4a3..17cef6e1c 100644 --- a/src/textures/textures.h +++ b/src/textures/textures.h @@ -601,12 +601,11 @@ protected: }; // A texture that doesn't really exist -class FDummyTexture : public FTexture +class FDummyTexture : public FWorldTexture { public: FDummyTexture (); - const uint8_t *GetColumn (unsigned int column, const Span **spans_out); - const uint8_t *GetPixels (); + uint8_t *MakeTexture(FRenderStyle); void SetSize (int width, int height); }; @@ -618,7 +617,7 @@ public: ~FWarpTexture (); virtual int CopyTrueColorPixels(FBitmap *bmp, int x, int y, int rotate=0, FCopyInfo *inf = NULL); - const uint8_t *GetColumn (unsigned int column, const Span **spans_out); + const uint8_t *GetColumn(unsigned int column, const Span **spans_out); const uint8_t *GetPixels (); const uint32_t *GetPixelsBgra() override; void Unload (); @@ -653,7 +652,7 @@ public: FCanvasTexture (const char *name, int width, int height); ~FCanvasTexture (); - const uint8_t *GetColumn (unsigned int column, const Span **spans_out); + const uint8_t *GetColumn(unsigned int column, const Span **spans_out); const uint8_t *GetPixels (); const uint32_t *GetPixelsBgra() override; void Unload (); diff --git a/src/textures/warptexture.cpp b/src/textures/warptexture.cpp index 2e073c186..41920849d 100644 --- a/src/textures/warptexture.cpp +++ b/src/textures/warptexture.cpp @@ -117,7 +117,7 @@ const uint32_t *FWarpTexture::GetPixelsBgra() return PixelsBgra.data(); } -const uint8_t *FWarpTexture::GetColumn (unsigned int column, const Span **spans_out) +const uint8_t *FWarpTexture::GetColumn(unsigned int column, const Span **spans_out) { uint64_t time =screen->FrameTime; diff --git a/src/v_font.cpp b/src/v_font.cpp index a8afa079c..1b36c2219 100644 --- a/src/v_font.cpp +++ b/src/v_font.cpp @@ -177,7 +177,7 @@ class FFontChar1 : public FTexture { public: FFontChar1 (FTexture *sourcelump); - const uint8_t *GetColumn (unsigned int column, const Span **spans_out); + const uint8_t *GetColumn(unsigned int column, const Span **spans_out); const uint8_t *GetPixels (); void SetSourceRemap(const uint8_t *sourceremap); void Unload (); @@ -198,7 +198,7 @@ public: FFontChar2 (int sourcelump, int sourcepos, int width, int height, int leftofs=0, int topofs=0); ~FFontChar2 (); - const uint8_t *GetColumn (unsigned int column, const Span **spans_out); + const uint8_t *GetColumn(unsigned int column, const Span **spans_out); const uint8_t *GetPixels (); void SetSourceRemap(const uint8_t *sourceremap); void Unload (); @@ -559,7 +559,7 @@ void RecordTextureColors (FTexture *pic, uint8_t *usedcolors) for (x = pic->GetWidth() - 1; x >= 0; x--) { const FTexture::Span *spans; - const uint8_t *column = pic->GetColumn (x, &spans); + const uint8_t *column = pic->GetColumn(x, &spans); while (spans->Length != 0) { @@ -1692,7 +1692,7 @@ void FFontChar1::MakeTexture () // //========================================================================== -const uint8_t *FFontChar1::GetColumn (unsigned int column, const Span **spans_out) +const uint8_t *FFontChar1::GetColumn(unsigned int column, const Span **spans_out) { if (Pixels == NULL) { @@ -1814,7 +1814,7 @@ const uint8_t *FFontChar2::GetPixels () // //========================================================================== -const uint8_t *FFontChar2::GetColumn (unsigned int column, const Span **spans_out) +const uint8_t *FFontChar2::GetColumn(unsigned int column, const Span **spans_out) { if (Pixels == NULL) { diff --git a/src/v_video.cpp b/src/v_video.cpp index ca2e8b62a..77f83b285 100644 --- a/src/v_video.cpp +++ b/src/v_video.cpp @@ -1008,7 +1008,7 @@ void FPaletteTester::SetTranslation(int num) // //========================================================================== -const uint8_t *FPaletteTester::GetColumn (unsigned int column, const Span **spans_out) +const uint8_t *FPaletteTester::GetColumn(unsigned int column, const Span **spans_out) { if (CurTranslation != WantTranslation) {