From 297c66bf04024d1217e47cb481651f2697470182 Mon Sep 17 00:00:00 2001 From: Benau Date: Thu, 25 Jan 2018 15:41:30 +0800 Subject: [PATCH] Remove unused cpp and hpp files --- sources.cmake | 2 +- src/graphics/large_mesh_buffer.hpp | 58 ------------------- src/graphics/screen_quad.cpp | 31 ---------- src/graphics/screen_quad.hpp | 90 ------------------------------ 4 files changed, 1 insertion(+), 180 deletions(-) delete mode 100644 src/graphics/large_mesh_buffer.hpp delete mode 100644 src/graphics/screen_quad.cpp delete mode 100644 src/graphics/screen_quad.hpp diff --git a/sources.cmake b/sources.cmake index ba4868d71..d4f28ae4d 100644 --- a/sources.cmake +++ b/sources.cmake @@ -1,5 +1,5 @@ # Modify this file to change the last-modified date when you add/remove a file. -# This will then trigger a new cmake run automatically. +# This will then trigger a new cmake run automatically. file(GLOB_RECURSE STK_HEADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.hpp") file(GLOB_RECURSE STK_SOURCES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "src/*.cpp") file(GLOB_RECURSE STK_SHADERS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} "data/shaders/*") diff --git a/src/graphics/large_mesh_buffer.hpp b/src/graphics/large_mesh_buffer.hpp deleted file mode 100644 index 0350b6c17..000000000 --- a/src/graphics/large_mesh_buffer.hpp +++ /dev/null @@ -1,58 +0,0 @@ -// Copyright (C) 2002-2015 Nikolaus Gebhardt -// This file is part of the "Irrlicht Engine". -// For conditions of distribution and use, see copyright notice in irrlicht.h - -#ifndef __LARGE_MESH_BUFFER_H_INCLUDED__ -#define __LARGE_MESH_BUFFER_H_INCLUDED__ - -#include "irrArray.h" -#include "IMeshBuffer.h" -#include "CMeshBuffer.h" - -namespace irr -{ -namespace scene -{ - //! A SMeshBuffer with 32-bit indices - class LargeMeshBuffer : public SMeshBuffer - { - public: - //! Get type of index data which is stored in this meshbuffer. - /** \return Index type of this buffer. */ - virtual video::E_INDEX_TYPE getIndexType() const - { - return video::EIT_32BIT; - } - - //! Get pointer to indices - /** \return Pointer to indices. */ - virtual const u16* getIndices() const - { - return (u16 *) Indices.const_pointer(); - } - - - //! Get pointer to indices - /** \return Pointer to indices. */ - virtual u16* getIndices() - { - return (u16 *) Indices.pointer(); - } - - - //! Get number of indices - /** \return Number of indices. */ - virtual u32 getIndexCount() const - { - return Indices.size(); - } - - //! Indices into the vertices of this buffer. - core::array Indices; - }; -} // end namespace scene -} // end namespace irr - -#endif - - diff --git a/src/graphics/screen_quad.cpp b/src/graphics/screen_quad.cpp deleted file mode 100644 index 16c94a515..000000000 --- a/src/graphics/screen_quad.cpp +++ /dev/null @@ -1,31 +0,0 @@ -// SuperTuxKart - a fun racing game with go-kart -// Copyright (C) 2014-2015 SuperTuxKart-Team -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 3 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#include "graphics/screen_quad.hpp" - -// Just the static parts to our screenquad - -const u16 ScreenQuad::indices[4] = {0, 1, 2, 3}; - -static const SColor white(255, 255, 255, 255); - -const S3DVertex ScreenQuad::vertices[4] = { - S3DVertex(-1, 1, 0, 0, 1, 0, white, 0, 1), - S3DVertex(1, 1, 0, 0, 1, 0, white, 1, 1), - S3DVertex(-1, -1, 0, 0, 1, 0, white, 0, 0), - S3DVertex(1, -1, 0, 0, 1, 0, white, 1, 0), - }; diff --git a/src/graphics/screen_quad.hpp b/src/graphics/screen_quad.hpp deleted file mode 100644 index 87c11dfce..000000000 --- a/src/graphics/screen_quad.hpp +++ /dev/null @@ -1,90 +0,0 @@ -// SuperTuxKart - a fun racing game with go-kart -// Copyright (C) 2014-2015 SuperTuxKart-Team -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of the GNU General Public License -// as published by the Free Software Foundation; either version 3 -// of the License, or (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - -#ifndef HEADER_SCREENQUAD_H -#define HEADER_SCREENQUAD_H - -#include -#include - -using namespace irr; -using namespace video; - -class ScreenQuad { - -public: - ScreenQuad(IVideoDriver *xy) - { - vd = xy; - - mat.Lighting = false; - mat.ZBuffer = video::ECFN_ALWAYS; - mat.ZWriteEnable = false; - - for(u32 c = 0; c < MATERIAL_MAX_TEXTURES; c++) - { - mat.TextureLayer[c].TextureWrapU = video::ETC_CLAMP_TO_EDGE; - mat.TextureLayer[c].TextureWrapV = video::ETC_CLAMP_TO_EDGE; - } - } - - SMaterial& getMaterial() { return mat; } - - //Set the texture to render with the quad - void setTexture(ITexture* tex, u32 layer = 0) - { - mat.TextureLayer[layer].Texture = tex; - } - - ITexture* getTexture(u32 layer = 0) const { return mat.TextureLayer[layer].Texture; } - - void setMaterialType(E_MATERIAL_TYPE mt) { mat.MaterialType = mt; } - - void render(bool setRTToFrameBuff = true) const - { - if(setRTToFrameBuff) - vd->setRenderTarget(video::ERT_FRAME_BUFFER); - - sq_dorender(); - } - - void render(ITexture* rt) const - { - vd->setRenderTarget(rt); - - sq_dorender(); - } - -protected: - static const S3DVertex vertices[4]; - static const u16 indices[4]; - SMaterial mat; - - IVideoDriver* vd; - - void sq_dorender() const - { - vd->setMaterial(mat); - vd->setTransform(ETS_WORLD, core::IdentityMatrix); - vd->setTransform(ETS_VIEW, core::IdentityMatrix); - vd->setTransform(ETS_PROJECTION, core::IdentityMatrix); - vd->drawVertexPrimitiveList(vertices, 4, indices, 2, EVT_STANDARD, - scene::EPT_TRIANGLE_STRIP); - } -}; - -#endif