|
From: <ka...@us...> - 2012-12-30 05:12:07
|
Revision: 7706
http://paintown.svn.sourceforge.net/paintown/?rev=7706&view=rev
Author: kazzmir
Date: 2012-12-30 05:12:00 +0000 (Sun, 30 Dec 2012)
Log Message:
-----------
[paintown] remove heart files
Modified Paths:
--------------
trunk/src/paintown-engine/CMakeLists.txt
trunk/src/paintown-engine/game/game.cpp
trunk/src/paintown-engine/network/client.cpp
trunk/src/paintown-engine/network/server.cpp
Removed Paths:
-------------
trunk/src/paintown-engine/factory/heart_factory.cpp
trunk/src/paintown-engine/factory/heart_factory.h
trunk/src/paintown-engine/object/heart.cpp
trunk/src/paintown-engine/object/heart.h
Modified: trunk/src/paintown-engine/CMakeLists.txt
===================================================================
--- trunk/src/paintown-engine/CMakeLists.txt 2012-12-30 04:01:16 UTC (rev 7705)
+++ trunk/src/paintown-engine/CMakeLists.txt 2012-12-30 05:12:00 UTC (rev 7706)
@@ -48,7 +48,6 @@
environment/atmosphere.cpp)
set(PAINTOWN_FACTORY_SRC
-factory/heart_factory.cpp
factory/object_factory.cpp
factory/shadow.cpp)
@@ -79,8 +78,7 @@
object/trigger.cpp
object/attack.cpp
object/stimulation.cpp
-object/character.cpp
-object/heart.cpp)
+object/character.cpp)
set(TRIGGER_SRC
trigger/trigger.cpp
Deleted: trunk/src/paintown-engine/factory/heart_factory.cpp
===================================================================
--- trunk/src/paintown-engine/factory/heart_factory.cpp 2012-12-30 04:01:16 UTC (rev 7705)
+++ trunk/src/paintown-engine/factory/heart_factory.cpp 2012-12-30 05:12:00 UTC (rev 7706)
@@ -1,52 +0,0 @@
-#include <iostream>
-#include <vector>
-#include "heart_factory.h"
-#include "paintown-engine/object/heart.h"
-#include "globals.h"
-#include "util/debug.h"
-
-using namespace std;
-
-HeartFactory * HeartFactory::my_heart = NULL;
-Heart * HeartFactory::createHeart(){
- if ( my_heart == NULL )
- my_heart = new HeartFactory();
-
- return my_heart->makeHeart();
-}
-
-void HeartFactory::destroy(){
- if ( my_heart != NULL ){
- if ( my_heart->clearHearts() ){
- delete my_heart;
- my_heart = NULL;
- } else {
- Global::debug(0) <<"Heart factory has hearts left!"<<endl;
- }
- }
-}
-
-Heart * HeartFactory::makeHeart(){
- Heart * h = new Heart();
- hearts.push_back( h );
-
- return h;
-}
-
-bool HeartFactory::clearHearts(){
- for ( vector< Heart * >::iterator it = hearts.begin(); it != hearts.end(); ){
- Heart * k = *it;
- if ( ! k->getAlive() ){
- delete k;
- it = hearts.erase( it );
- } else it++;
- }
-
- return hearts.empty();
-}
-
-HeartFactory::HeartFactory(){
-}
-
-HeartFactory::~HeartFactory(){
-}
Deleted: trunk/src/paintown-engine/factory/heart_factory.h
===================================================================
--- trunk/src/paintown-engine/factory/heart_factory.h 2012-12-30 04:01:16 UTC (rev 7705)
+++ trunk/src/paintown-engine/factory/heart_factory.h 2012-12-30 05:12:00 UTC (rev 7706)
@@ -1,28 +0,0 @@
-#ifndef _heart_factory_h
-#define _heart_factory_h
-
-#include <vector>
-
-class Heart;
-
-class HeartFactory{
-public:
-
- static Heart * createHeart();
-
- static void destroy();
-
-protected:
-
- Heart * makeHeart();
- bool clearHearts();
-
- HeartFactory();
- ~HeartFactory();
-
- std::vector< Heart * > hearts;
- static HeartFactory * my_heart;
-
-};
-
-#endif
Modified: trunk/src/paintown-engine/game/game.cpp
===================================================================
--- trunk/src/paintown-engine/game/game.cpp 2012-12-30 04:01:16 UTC (rev 7705)
+++ trunk/src/paintown-engine/game/game.cpp 2012-12-30 05:12:00 UTC (rev 7706)
@@ -21,7 +21,6 @@
#include "../object/player.h"
#include "../object/animation.h"
#include "../factory/object_factory.h"
-#include "../factory/heart_factory.h"
#include "paintown-engine/level/utils.h"
#include "factory/font_render.h"
#include "util/token.h"
@@ -949,7 +948,6 @@
virtual ~Cleanup(){
Keyboard::popRepeatState();
ObjectFactory::destroy();
- HeartFactory::destroy();
}
};
Modified: trunk/src/paintown-engine/network/client.cpp
===================================================================
--- trunk/src/paintown-engine/network/client.cpp 2012-12-30 04:01:16 UTC (rev 7705)
+++ trunk/src/paintown-engine/network/client.cpp 2012-12-30 05:12:00 UTC (rev 7706)
@@ -18,7 +18,6 @@
#include "../level/utils.h"
#include "factory/font_render.h"
#include "../factory/object_factory.h"
-#include "../factory/heart_factory.h"
#include "util/sound/music.h"
#include "../game/world.h"
#include "../object/character.h"
@@ -265,7 +264,6 @@
bool forceQuit = ! Game::playLevel(world, xplayers);
ObjectFactory::destroy();
- HeartFactory::destroy();
if (forceQuit){
Global::debug(1, __FILE__) << "Force quit" << endl;
Modified: trunk/src/paintown-engine/network/server.cpp
===================================================================
--- trunk/src/paintown-engine/network/server.cpp 2012-12-30 04:01:16 UTC (rev 7705)
+++ trunk/src/paintown-engine/network/server.cpp 2012-12-30 05:12:00 UTC (rev 7706)
@@ -6,7 +6,6 @@
#include "chat_server.h"
#include "factory/font_render.h"
-#include "../factory/heart_factory.h"
#include "../factory/object_factory.h"
#include "../game/game.h"
#include "globals.h"
@@ -234,7 +233,6 @@
}
ObjectFactory::destroy();
- HeartFactory::destroy();
if ( ! gameState ){
return;
@@ -530,7 +528,6 @@
bool played = Game::playLevel(world, players);
ObjectFactory::destroy();
- HeartFactory::destroy();
world.stopRunning();
Message finish;
Deleted: trunk/src/paintown-engine/object/heart.cpp
===================================================================
--- trunk/src/paintown-engine/object/heart.cpp 2012-12-30 04:01:16 UTC (rev 7705)
+++ trunk/src/paintown-engine/object/heart.cpp 2012-12-30 05:12:00 UTC (rev 7706)
@@ -1,11 +0,0 @@
-#include "heart.h"
-#include <iostream>
-
-using namespace std;
-
-Heart::Heart():
-alive( true ){
-}
-
-Heart::~Heart(){
-}
Deleted: trunk/src/paintown-engine/object/heart.h
===================================================================
--- trunk/src/paintown-engine/object/heart.h 2012-12-30 04:01:16 UTC (rev 7705)
+++ trunk/src/paintown-engine/object/heart.h 2012-12-30 05:12:00 UTC (rev 7706)
@@ -1,28 +0,0 @@
-#ifndef _heart_h
-#define _heart_h
-
-class HeartFactory;
-
-class Heart{
-protected:
-
- Heart();
- virtual ~Heart();
-
-public:
-
- inline bool getAlive() const{
- return alive;
- }
-
- inline void setAlive( const bool b ){
- alive = b;
- }
-
- friend class HeartFactory;
-
-private:
- bool alive;
-};
-
-#endif
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|