Author: grumbel Date: 2008-07-04 08:54:00 +0200 (Fri, 04 Jul 2008) New Revision: 3661
Removed: trunk/pingus/src/blitter_test.cpp trunk/pingus/src/blitter_test.hpp trunk/pingus/src/timer.cpp trunk/pingus/src/timer.hpp Modified: trunk/pingus/SConstruct trunk/pingus/src/worldobjs/surface_background.cpp Log: Some more cleanup of old cruft Modified: trunk/pingus/SConstruct =================================================================== --- trunk/pingus/SConstruct 2008-07-04 05:39:52 UTC (rev 3660) +++ trunk/pingus/SConstruct 2008-07-04 06:54:00 UTC (rev 3661) @@ -53,7 +53,6 @@ 'src/actions/walker.cpp', 'src/addon_menu.cpp', 'src/blitter.cpp', -# 'blitter_test.cpp', 'src/capture_rectangle.cpp', 'src/cheat.cpp', 'src/col_map.cpp', @@ -234,7 +233,6 @@ 'src/math/rect.cpp', 'src/math.cpp', 'src/system.cpp', -'src/timer.cpp', 'src/tinygettext/iconv.cpp', 'src/tinygettext/po_file_reader.cpp', 'src/tinygettext/dictionary_manager.cpp', Deleted: trunk/pingus/src/blitter_test.cpp =================================================================== --- trunk/pingus/src/blitter_test.cpp 2008-07-04 05:39:52 UTC (rev 3660) +++ trunk/pingus/src/blitter_test.cpp 2008-07-04 06:54:00 UTC (rev 3661) @@ -1,69 +0,0 @@ -// Pingus - A free Lemmings clone -// Copyright (C) 2002 Ingo Ruhnke <[EMAIL PROTECTED]> -// -// 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, see <http://www.gnu.org/licenses/>. - -#include <ClanLib/Core/System/system.h> -#include <ClanLib/Display/surface.h> -#include "resource.hpp" -#include "timer.hpp" -#include "blitter.hpp" -#include "blitter_test.hpp" - - -class BlitterTestImpl -{ -public: - BlitterTestImpl() {} - void run() - { - //CL_Surface surf = Resource::load_surface("textures/stone", "textures"); - CL_Surface surf = Resource::load_surface("textures/greentex"); - - Surface buf(256, 256, 256*4, CL_PixelFormat::rgba8888); - Surface data = surf.get_pixeldata(); - Timer bench("Blit"); - Blitter::put_surface(buf, data, 0, 0); - Blitter::fill_rect(buf, CL_Rect(-50, -50, 250, 250), Color(255, 150, 50, 128)); - Blitter::fill_rect(buf, CL_Rect(50, 50, 150, 150), Color(255, 150, 50, 155)); - bench.stop(); - - CL_Surface surf2(buf); - - while(!CL_Keyboard::get_keycode(CL_KEY_ESCAPE)) - { - CL_Display::clear(Color(155, 0, 0)); - surf.draw(0, 0); - surf2.draw(400, 0); - - CL_Display::flip(); - CL_System::keep_alive(); - CL_System::sleep(100); - } - } -}; - -BlitterTest::BlitterTest() -{ - impl = new BlitterTestImpl(); -} - -void -BlitterTest::run() -{ - impl->run(); -} - - -/* EOF */ Deleted: trunk/pingus/src/blitter_test.hpp =================================================================== --- trunk/pingus/src/blitter_test.hpp 2008-07-04 05:39:52 UTC (rev 3660) +++ trunk/pingus/src/blitter_test.hpp 2008-07-04 06:54:00 UTC (rev 3661) @@ -1,36 +0,0 @@ -// Pingus - A free Lemmings clone -// Copyright (C) 2002 Ingo Ruhnke <[EMAIL PROTECTED]> -// -// 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, see <http://www.gnu.org/licenses/>. - -#ifndef HEADER_BLITTER_TEST_HPP -#define HEADER_BLITTER_TEST_HPP - - -class BlitterTestImpl; - -/** */ -class BlitterTest -{ -private: - BlitterTestImpl* impl; -public: - BlitterTest(); - void run(); -}; - - -#endif - -/* EOF */ Deleted: trunk/pingus/src/timer.cpp =================================================================== --- trunk/pingus/src/timer.cpp 2008-07-04 05:39:52 UTC (rev 3660) +++ trunk/pingus/src/timer.cpp 2008-07-04 06:54:00 UTC (rev 3661) @@ -1,39 +0,0 @@ -// Pingus - A free Lemmings clone -// Copyright (C) 2000 Ingo Ruhnke <[EMAIL PROTECTED]> -// -// 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, see <http://www.gnu.org/licenses/>. - -#include "SDL.h" -#include "debug.hpp" -#include "globals.hpp" -#include "timer.hpp" - - -Timer::Timer(const char* desc) - : description(desc), - start_time(SDL_GetTicks()) -{ -} - -void -Timer::stop() -{ - unsigned int time = SDL_GetTicks() - start_time; - pout(PINGUS_DEBUG_LOADING) - << "Timer: '" << description << "' took " - << time << "msec" << std::endl; -} - - -/* EOF */ Deleted: trunk/pingus/src/timer.hpp =================================================================== --- trunk/pingus/src/timer.hpp 2008-07-04 05:39:52 UTC (rev 3660) +++ trunk/pingus/src/timer.hpp 2008-07-04 06:54:00 UTC (rev 3661) @@ -1,47 +0,0 @@ -// Pingus - A free Lemmings clone -// Copyright (C) 2000 Ingo Ruhnke <[EMAIL PROTECTED]> -// -// 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, see <http://www.gnu.org/licenses/>. - -#ifndef HEADER_PINGUS_TIMER_HPP -#define HEADER_PINGUS_TIMER_HPP - -#include "pingus.hpp" - - -/** A simple class for benchmark purpose. It lets you start and stop a - timer and recieve the time passed.*/ -class Timer -{ -private: - const char* description; - unsigned int start_time; - -public: - /** Init a timer with a description and start it */ - Timer(const char* desc); - - /** Stop the timer - @return The time passed since the last start() */ - void stop(); - -private: - Timer (const Timer&); - Timer& operator= (const Timer&); -}; - - -#endif - -/* EOF */ Modified: trunk/pingus/src/worldobjs/surface_background.cpp =================================================================== --- trunk/pingus/src/worldobjs/surface_background.cpp 2008-07-04 05:39:52 UTC (rev 3660) +++ trunk/pingus/src/worldobjs/surface_background.cpp 2008-07-04 06:54:00 UTC (rev 3661) @@ -17,7 +17,6 @@ #include <iostream> #include "../display/scene_context.hpp" #include "../world.hpp" -#include "../timer.hpp" #include "../resource.hpp" #include "../globals.hpp" #include "../blitter.hpp" @@ -57,8 +56,6 @@ reader.read_bool("keep-aspect", keep_aspect); - Timer timer("Background creation"); - bg_surface = Sprite(desc); bg_surface.fill(color); @@ -91,8 +88,6 @@ bg_surface.scale(bg_surface.get_width(), world->get_height()); } } - - timer.stop(); } float _______________________________________________ pingus-cvs mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/pingus-cvs
