[Scummvm-cvs-logs] SF.net SVN: scummvm:[55595] scummvm/trunk/engines/sword25

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Fri Jan 28 18:02:02 CET 2011


Revision: 55595
          http://scummvm.svn.sourceforge.net/scummvm/?rev=55595&view=rev
Author:   thebluegr
Date:     2011-01-28 17:02:02 +0000 (Fri, 28 Jan 2011)

Log Message:
-----------
SWORD25: Removed some more unused/unimplemented debug code

Modified Paths:
--------------
    scummvm/trunk/engines/sword25/gfx/graphicengine.cpp
    scummvm/trunk/engines/sword25/gfx/graphicengine.h
    scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp
    scummvm/trunk/engines/sword25/kernel/resservice.h
    scummvm/trunk/engines/sword25/module.mk

Removed Paths:
-------------
    scummvm/trunk/engines/sword25/gfx/framecounter.cpp
    scummvm/trunk/engines/sword25/gfx/framecounter.h

Deleted: scummvm/trunk/engines/sword25/gfx/framecounter.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/framecounter.cpp	2011-01-28 16:54:55 UTC (rev 55594)
+++ scummvm/trunk/engines/sword25/gfx/framecounter.cpp	2011-01-28 17:02:02 UTC (rev 55595)
@@ -1,68 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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 2
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-/*
- * This code is based on Broken Sword 2.5 engine
- *
- * Copyright (c) Malte Thiesen, Daniel Queteschiner and Michael Elsdoerfer
- *
- * Licensed under GNU GPL v2
- *
- */
-
-#include "common/system.h"
-#include "sword25/gfx/framecounter.h"
-
-namespace Sword25 {
-
-Framecounter::Framecounter(int updateFrequency) :
-	_FPS(0),
-	_FPSCount(0),
-	_lastUpdateTime(-1) {
-	setUpdateFrequency(updateFrequency);
-}
-
-void Framecounter::update() {
-	// Aktuellen Systemtimerstand auslesen
-	uint64 timer = g_system->getMillis() * 1000;
-
-	// Falls m_LastUpdateTime == -1 ist, wird der Frame-Counter zum ersten Mal aufgerufen und der aktuelle Systemtimer als erster
-	// Messzeitpunkt genommen.
-	if (_lastUpdateTime == -1)
-		_lastUpdateTime = timer;
-	else {
-		// Die Anzahl der Frames im aktuellen Messzeitraum wird erh\xF6ht.
-		_FPSCount++;
-
-		// Falls der Messzeitraum verstrichen ist, wird die durchschnittliche Framerate berechnet und ein neuer Messzeitraum begonnen.
-		if (timer - _lastUpdateTime >= _updateDelay) {
-			_FPS = static_cast<int>((1000000 * (uint64)_FPSCount) / (timer - _lastUpdateTime));
-			_lastUpdateTime = timer;
-			_FPSCount = 0;
-		}
-	}
-}
-
-} // End of namespace Sword25

Deleted: scummvm/trunk/engines/sword25/gfx/framecounter.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/framecounter.h	2011-01-28 16:54:55 UTC (rev 55594)
+++ scummvm/trunk/engines/sword25/gfx/framecounter.h	2011-01-28 17:02:02 UTC (rev 55595)
@@ -1,99 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * 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 2
- * 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- *
- * $URL$
- * $Id$
- *
- */
-
-/*
- * This code is based on Broken Sword 2.5 engine
- *
- * Copyright (c) Malte Thiesen, Daniel Queteschiner and Michael Elsdoerfer
- *
- * Licensed under GNU GPL v2
- *
- */
-
-#ifndef SWORD25_FRAMECOUNTER_H
-#define SWORD25_FRAMECOUNTER_H
-
-// Includes
-#include "sword25/kernel/common.h"
-
-namespace Sword25 {
-
-/**
- * A simple class that implements a frame counter
- */
-class Framecounter {
-private:
-
-	// TODO: This class should be rewritten based on Audio::Timestamp,
-	// which provides higher accuracy and avoids using 64 bit data types.
-	typedef unsigned long long uint64;
-	typedef signed long long int64;
-
-	enum {
-		DEFAULT_UPDATE_FREQUENCY = 10
-	};
-
-public:
-	/**
-	 * Creates a new BS_Framecounter object
-	 * @param UpdateFrequency   Specifies how often the frame counter should be updated in a sceond.
-	 * The default value is 10.
-	 */
-	Framecounter(int updateFrequency = DEFAULT_UPDATE_FREQUENCY);
-
-	/**
-	 * Determines how often the frame counter should be updated in a second.
-	 * @param UpdateFrequency   Specifies how often the frame counter should be updated in a second.
-	 */
-	inline void setUpdateFrequency(int updateFrequency);
-
-	/**
-	 * This method must be called once per frame.
-	 */
-	void update();
-
-	/**
-	 * Returns the current FPS value.
-	 */
-	int getFPS() const {
-		return _FPS;
-	}
-
-private:
-	int _FPS;
-	int _FPSCount;
-	int64 _lastUpdateTime;
-	uint64 _updateDelay;
-};
-
-// Inlines
-void Framecounter::setUpdateFrequency(int updateFrequency) {
-	// Frequency in time (converted to microseconds)
-	_updateDelay = 1000000 / updateFrequency;
-}
-
-} // End of namespace Sword25
-
-#endif

Modified: scummvm/trunk/engines/sword25/gfx/graphicengine.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/graphicengine.cpp	2011-01-28 16:54:55 UTC (rev 55594)
+++ scummvm/trunk/engines/sword25/gfx/graphicengine.cpp	2011-01-28 17:02:02 UTC (rev 55595)
@@ -72,7 +72,6 @@
 	_lastFrameDuration(0),
 	_timerActive(true),
 	_frameTimeSampleSlot(0),
-	_repaintedPixels(0),
 	_thumbnail(NULL),
 	ResourceService(pKernel) {
 	_frameTimeSamples.resize(FRAMETIME_SAMPLE_COUNT);
@@ -183,9 +182,6 @@
 		_debugLines.clear();
 	}
 
-	// Framecounter aktualisieren
-	_FPSCounter.update();
-
 	return true;
 }
 

Modified: scummvm/trunk/engines/sword25/gfx/graphicengine.h
===================================================================
--- scummvm/trunk/engines/sword25/gfx/graphicengine.h	2011-01-28 16:54:55 UTC (rev 55594)
+++ scummvm/trunk/engines/sword25/gfx/graphicengine.h	2011-01-28 17:02:02 UTC (rev 55595)
@@ -52,7 +52,6 @@
 #include "sword25/kernel/common.h"
 #include "sword25/kernel/resservice.h"
 #include "sword25/kernel/persistable.h"
-#include "sword25/gfx/framecounter.h"
 #include "sword25/gfx/renderobjectptr.h"
 #include "sword25/math/vertex.h"
 
@@ -266,15 +265,6 @@
 	 */
 	bool fill(const Common::Rect *fillRectPtr = 0, uint color = BS_RGB(0, 0, 0));
 
-	// Debugging Methods
-
-	int getFPSCount() const {
-		return _FPSCounter.getFPS();
-	}
-	int getRepaintedPixels() const {
-		return _repaintedPixels;
-	}
-
 	Graphics::Surface _backSurface;
 	Graphics::Surface *getSurface() { return &_backSurface; }
 
@@ -342,12 +332,6 @@
 	int _bitDepth;
 	bool _windowed;
 
-	// Debugging Variables
-	// -------------------
-	Framecounter _FPSCounter;
-
-	uint _repaintedPixels;
-
 	/**
 	 * Calculates the time since the last frame beginning has passed.
 	 */

Modified: scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp
===================================================================
--- scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp	2011-01-28 16:54:55 UTC (rev 55594)
+++ scummvm/trunk/engines/sword25/gfx/graphicengine_script.cpp	2011-01-28 17:02:02 UTC (rev 55595)
@@ -346,7 +346,8 @@
 static int getFPSCount(lua_State *L) {
 	GraphicEngine *pGE = getGE();
 
-	lua_pushnumber(L, pGE->getFPSCount());
+	// Used in a debug function
+	lua_pushnumber(L, 0);
 
 	return 1;
 }
@@ -395,7 +396,8 @@
 
 static int getRepaintedPixels(lua_State *L) {
 	GraphicEngine *pGE = getGE();
-	lua_pushnumber(L, static_cast<lua_Number>(pGE->getRepaintedPixels()));
+	// Used in a debug function.
+	lua_pushnumber(L, 0);
 	return 1;
 }
 

Modified: scummvm/trunk/engines/sword25/kernel/resservice.h
===================================================================
--- scummvm/trunk/engines/sword25/kernel/resservice.h	2011-01-28 16:54:55 UTC (rev 55594)
+++ scummvm/trunk/engines/sword25/kernel/resservice.h	2011-01-28 17:02:02 UTC (rev 55595)
@@ -53,7 +53,6 @@
 
 	virtual ~ResourceService() {}
 
-
 	/**
 	 * Loads a resource
 	 * @return      Returns the resource if successful, otherwise NULL

Modified: scummvm/trunk/engines/sword25/module.mk
===================================================================
--- scummvm/trunk/engines/sword25/module.mk	2011-01-28 16:54:55 UTC (rev 55594)
+++ scummvm/trunk/engines/sword25/module.mk	2011-01-28 17:02:02 UTC (rev 55595)
@@ -14,7 +14,6 @@
 	gfx/bitmap.o \
 	gfx/dynamicbitmap.o \
 	gfx/fontresource.o \
-	gfx/framecounter.o \
 	gfx/graphicengine.o \
 	gfx/graphicengine_script.o \
 	gfx/panel.o \


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list