[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] r4191 - in trunk/pingus/src: engine/display engine/display/
From: |
grumbel |
Subject: |
[Pingus-CVS] r4191 - in trunk/pingus/src: engine/display engine/display/opengl engine/screen lisp pingus pingus/components pingus/worldmap util |
Date: |
Sun, 28 Aug 2011 23:17:09 +0200 |
Author: grumbel
Date: 2011-08-28 23:17:09 +0200 (Sun, 28 Aug 2011)
New Revision: 4191
Modified:
trunk/pingus/src/engine/display/delta_framebuffer.cpp
trunk/pingus/src/engine/display/drawing_context.cpp
trunk/pingus/src/engine/display/font.hpp
trunk/pingus/src/engine/display/framebuffer_surface.hpp
trunk/pingus/src/engine/display/graphic_context_state.hpp
trunk/pingus/src/engine/display/opengl/opengl_framebuffer_surface_impl.cpp
trunk/pingus/src/engine/display/sprite.cpp
trunk/pingus/src/engine/display/sprite.hpp
trunk/pingus/src/engine/display/surface.cpp
trunk/pingus/src/engine/display/surface.hpp
trunk/pingus/src/engine/screen/screen_manager.hpp
trunk/pingus/src/lisp/lisp.cpp
trunk/pingus/src/lisp/lisp.hpp
trunk/pingus/src/lisp/parser.cpp
trunk/pingus/src/lisp/parser.hpp
trunk/pingus/src/lisp/property_iterator.hpp
trunk/pingus/src/pingus/components/button_panel.cpp
trunk/pingus/src/pingus/config_manager.cpp
trunk/pingus/src/pingus/pingu.cpp
trunk/pingus/src/pingus/pingu.hpp
trunk/pingus/src/pingus/pingus_level.hpp
trunk/pingus/src/pingus/resource_manager.cpp
trunk/pingus/src/pingus/savegame_manager.cpp
trunk/pingus/src/pingus/stat_manager.cpp
trunk/pingus/src/pingus/world.cpp
trunk/pingus/src/pingus/worldmap/pingus_worldmap.hpp
trunk/pingus/src/pingus/worldmap/worldmap_story.cpp
trunk/pingus/src/util/file_reader.cpp
trunk/pingus/src/util/file_reader.hpp
trunk/pingus/src/util/sexpr_file_reader.cpp
trunk/pingus/src/util/sexpr_file_reader.hpp
Log:
Replaced boost::shared_ptr<> with std::shared_ptr<>
Modified: trunk/pingus/src/engine/display/delta_framebuffer.cpp
===================================================================
--- trunk/pingus/src/engine/display/delta_framebuffer.cpp 2011-08-28
21:06:50 UTC (rev 4190)
+++ trunk/pingus/src/engine/display/delta_framebuffer.cpp 2011-08-28
21:17:09 UTC (rev 4191)
@@ -16,6 +16,8 @@
#include "engine/display/delta_framebuffer.hpp"
+#include <algorithm>
+
#include "engine/display/rect_merger.hpp"
#include "engine/display/sdl_framebuffer.hpp"
#include "util/memory_pool.hpp"
Modified: trunk/pingus/src/engine/display/drawing_context.cpp
===================================================================
--- trunk/pingus/src/engine/display/drawing_context.cpp 2011-08-28 21:06:50 UTC
(rev 4190)
+++ trunk/pingus/src/engine/display/drawing_context.cpp 2011-08-28 21:17:09 UTC
(rev 4191)
@@ -17,6 +17,7 @@
#include "engine/display/drawing_context.hpp"
#include <iostream>
+#include <algorithm>
#include "engine/display/display.hpp"
#include "engine/display/font.hpp"
Modified: trunk/pingus/src/engine/display/font.hpp
===================================================================
--- trunk/pingus/src/engine/display/font.hpp 2011-08-28 21:06:50 UTC (rev
4190)
+++ trunk/pingus/src/engine/display/font.hpp 2011-08-28 21:17:09 UTC (rev
4191)
@@ -18,7 +18,7 @@
#define HEADER_PINGUS_ENGINE_DISPLAY_FONT_HPP
#include <SDL.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include "math/rect.hpp"
@@ -42,7 +42,7 @@
Rect bounding_rect(int , int, const std::string& str) const;
private:
- boost::shared_ptr<FontImpl> impl;
+ std::shared_ptr<FontImpl> impl;
};
#endif
Modified: trunk/pingus/src/engine/display/framebuffer_surface.hpp
===================================================================
--- trunk/pingus/src/engine/display/framebuffer_surface.hpp 2011-08-28
21:06:50 UTC (rev 4190)
+++ trunk/pingus/src/engine/display/framebuffer_surface.hpp 2011-08-28
21:17:09 UTC (rev 4191)
@@ -52,7 +52,7 @@
Surface to_surface() const;
private:
- boost::shared_ptr<FramebufferSurfaceImpl> impl;
+ std::shared_ptr<FramebufferSurfaceImpl> impl;
};
#endif
Modified: trunk/pingus/src/engine/display/graphic_context_state.hpp
===================================================================
--- trunk/pingus/src/engine/display/graphic_context_state.hpp 2011-08-28
21:06:50 UTC (rev 4190)
+++ trunk/pingus/src/engine/display/graphic_context_state.hpp 2011-08-28
21:17:09 UTC (rev 4191)
@@ -17,7 +17,7 @@
#ifndef HEADER_PINGUS_ENGINE_DISPLAY_GRAPHIC_CONTEXT_STATE_HPP
#define HEADER_PINGUS_ENGINE_DISPLAY_GRAPHIC_CONTEXT_STATE_HPP
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include "engine/display/scene_context.hpp"
@@ -61,7 +61,7 @@
Vector2i screen2world(const Vector2i& pos) const;
private:
- boost::shared_ptr<GraphicContextStateImpl> impl;
+ std::shared_ptr<GraphicContextStateImpl> impl;
};
#endif
Modified:
trunk/pingus/src/engine/display/opengl/opengl_framebuffer_surface_impl.cpp
===================================================================
--- trunk/pingus/src/engine/display/opengl/opengl_framebuffer_surface_impl.cpp
2011-08-28 21:06:50 UTC (rev 4190)
+++ trunk/pingus/src/engine/display/opengl/opengl_framebuffer_surface_impl.cpp
2011-08-28 21:17:09 UTC (rev 4191)
@@ -16,6 +16,8 @@
#include "engine/display/opengl/opengl_framebuffer_surface_impl.hpp"
+#include <assert.h>
+
namespace {
inline int next_power_of_two(int val)
Modified: trunk/pingus/src/engine/display/sprite.cpp
===================================================================
--- trunk/pingus/src/engine/display/sprite.cpp 2011-08-28 21:06:50 UTC (rev
4190)
+++ trunk/pingus/src/engine/display/sprite.cpp 2011-08-28 21:17:09 UTC (rev
4191)
@@ -31,13 +31,13 @@
SpriteDescription* desc = Resource::load_sprite_desc(name);
if (desc)
{
- impl = boost::shared_ptr<SpriteImpl>(new SpriteImpl(*desc));
+ impl = std::shared_ptr<SpriteImpl>(new SpriteImpl(*desc));
}
else
{
SpriteDescription desc_;
desc_.filename = Pathname("images/core/misc/404.png", Pathname::DATA_PATH);
- impl = boost::shared_ptr<SpriteImpl>(new SpriteImpl(desc_));
+ impl = std::shared_ptr<SpriteImpl>(new SpriteImpl(desc_));
}
}
@@ -47,13 +47,13 @@
SpriteDescription* desc = Resource::load_sprite_desc(res_desc.res_name);
if (desc)
{
- impl = boost::shared_ptr<SpriteImpl>(new SpriteImpl(*desc,
res_desc.modifier));
+ impl = std::shared_ptr<SpriteImpl>(new SpriteImpl(*desc,
res_desc.modifier));
}
else
{
SpriteDescription desc_;
desc_.filename = Pathname("images/core/misc/404.png", Pathname::DATA_PATH);
- impl = boost::shared_ptr<SpriteImpl>(new SpriteImpl(desc_));
+ impl = std::shared_ptr<SpriteImpl>(new SpriteImpl(desc_));
}
}
@@ -62,7 +62,7 @@
{
SpriteDescription desc;
desc.filename = name;
- impl = boost::shared_ptr<SpriteImpl>(new SpriteImpl(desc));
+ impl = std::shared_ptr<SpriteImpl>(new SpriteImpl(desc));
}
Sprite::Sprite(const Surface& surface)
Modified: trunk/pingus/src/engine/display/sprite.hpp
===================================================================
--- trunk/pingus/src/engine/display/sprite.hpp 2011-08-28 21:06:50 UTC (rev
4190)
+++ trunk/pingus/src/engine/display/sprite.hpp 2011-08-28 21:17:09 UTC (rev
4191)
@@ -17,7 +17,7 @@
#ifndef HEADER_PINGUS_ENGINE_DISPLAY_SPRITE_HPP
#define HEADER_PINGUS_ENGINE_DISPLAY_SPRITE_HPP
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <string>
#include "math/origin.hpp"
@@ -63,7 +63,7 @@
Surface to_surface() const;
private:
- boost::shared_ptr<SpriteImpl> impl;
+ std::shared_ptr<SpriteImpl> impl;
};
#endif
Modified: trunk/pingus/src/engine/display/surface.cpp
===================================================================
--- trunk/pingus/src/engine/display/surface.cpp 2011-08-28 21:06:50 UTC (rev
4190)
+++ trunk/pingus/src/engine/display/surface.cpp 2011-08-28 21:17:09 UTC (rev
4191)
@@ -52,7 +52,7 @@
{
}
-Surface::Surface(boost::shared_ptr<SurfaceImpl> impl_) :
+Surface::Surface(std::shared_ptr<SurfaceImpl> impl_) :
impl(impl_)
{
}
@@ -63,7 +63,7 @@
SDL_Surface* surface = IMG_Load(pathname.get_sys_path().c_str());
if (surface)
{
- impl = boost::shared_ptr<SurfaceImpl>(new SurfaceImpl(surface));
+ impl = std::shared_ptr<SurfaceImpl>(new SurfaceImpl(surface));
}
}
@@ -258,7 +258,7 @@
Surface
Surface::scale(int w, int h)
{
- return Surface(boost::shared_ptr<SurfaceImpl>
+ return Surface(std::shared_ptr<SurfaceImpl>
(new SurfaceImpl(Blitter::scale_surface(impl->surface, w,
h))));
}
@@ -279,7 +279,7 @@
SDL_BlitSurface(impl->surface, NULL, new_surface, NULL);
}
- return Surface(boost::shared_ptr<SurfaceImpl>(new SurfaceImpl(new_surface)));
+ return Surface(std::shared_ptr<SurfaceImpl>(new SurfaceImpl(new_surface)));
}
Surface
@@ -301,7 +301,7 @@
SDL_BlitSurface(impl->surface, NULL, new_surface, &dst_rect);
- return Surface(boost::shared_ptr<SurfaceImpl>(new SurfaceImpl(new_surface)));
+ return Surface(std::shared_ptr<SurfaceImpl>(new SurfaceImpl(new_surface)));
}
void
Modified: trunk/pingus/src/engine/display/surface.hpp
===================================================================
--- trunk/pingus/src/engine/display/surface.hpp 2011-08-28 21:06:50 UTC (rev
4190)
+++ trunk/pingus/src/engine/display/surface.hpp 2011-08-28 21:17:09 UTC (rev
4191)
@@ -17,7 +17,7 @@
#ifndef HEADER_PINGUS_ENGINE_DISPLAY_SURFACE_HPP
#define HEADER_PINGUS_ENGINE_DISPLAY_SURFACE_HPP
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include "engine/display/resource_modifier.hpp"
#include "math/color.hpp"
@@ -34,7 +34,7 @@
public:
Surface();
- Surface(boost::shared_ptr<SurfaceImpl> impl);
+ Surface(std::shared_ptr<SurfaceImpl> impl);
Surface(const Pathname& name);
@@ -76,7 +76,7 @@
void print(std::ostream& out);
protected:
- boost::shared_ptr<SurfaceImpl> impl;
+ std::shared_ptr<SurfaceImpl> impl;
};
#endif
Modified: trunk/pingus/src/engine/screen/screen_manager.hpp
===================================================================
--- trunk/pingus/src/engine/screen/screen_manager.hpp 2011-08-28 21:06:50 UTC
(rev 4190)
+++ trunk/pingus/src/engine/screen/screen_manager.hpp 2011-08-28 21:17:09 UTC
(rev 4191)
@@ -35,7 +35,7 @@
class DrawingContext;
class Screen;
-typedef boost::shared_ptr<Screen> ScreenPtr;
+typedef std::shared_ptr<Screen> ScreenPtr;
class ScreenManager
{
Modified: trunk/pingus/src/lisp/lisp.cpp
===================================================================
--- trunk/pingus/src/lisp/lisp.cpp 2011-08-28 21:06:50 UTC (rev 4190)
+++ trunk/pingus/src/lisp/lisp.cpp 2011-08-28 21:17:09 UTC (rev 4191)
@@ -49,11 +49,11 @@
memcpy(v.string, str.c_str(), str.size()+1);
}
-Lisp::Lisp(const std::vector<boost::shared_ptr<Lisp> >& list_elements) :
+Lisp::Lisp(const std::vector<std::shared_ptr<Lisp> >& list_elements) :
v(), type(TYPE_LIST)
{
v.list.size = list_elements.size();
- v.list.entries = new boost::shared_ptr<Lisp> [v.list.size];
+ v.list.entries = new std::shared_ptr<Lisp> [v.list.size];
for(size_t i = 0; i < v.list.size; ++i) {
v.list.entries[i] = list_elements[i];
}
Modified: trunk/pingus/src/lisp/lisp.hpp
===================================================================
--- trunk/pingus/src/lisp/lisp.hpp 2011-08-28 21:06:50 UTC (rev 4190)
+++ trunk/pingus/src/lisp/lisp.hpp 2011-08-28 21:17:09 UTC (rev 4191)
@@ -18,7 +18,8 @@
#ifndef __LISP_HPP__
#define __LISP_HPP__
-#include <boost/shared_ptr.hpp>
+#include <assert.h>
+#include <memory>
#include <iostream>
#include <stdexcept>
#include <vector>
@@ -40,7 +41,7 @@
/// construct a new Lisp object symbol or string object
Lisp(LispType newtype, const std::string& value);
- Lisp(const std::vector<boost::shared_ptr<Lisp> >& list_elements);
+ Lisp(const std::vector<std::shared_ptr<Lisp> >& list_elements);
Lisp(int val);
Lisp(float val);
Lisp(bool val);
@@ -53,7 +54,7 @@
{
return v.list.size;
}
- boost::shared_ptr<Lisp> get_list_elem(size_t i) const
+ std::shared_ptr<Lisp> get_list_elem(size_t i) const
{
assert(i < v.list.size);
return v.list.entries[i];
@@ -108,7 +109,7 @@
union
{
struct {
- boost::shared_ptr<Lisp>* entries;
+ std::shared_ptr<Lisp>* entries;
size_t size;
} list;
char* string;
Modified: trunk/pingus/src/lisp/parser.cpp
===================================================================
--- trunk/pingus/src/lisp/parser.cpp 2011-08-28 21:06:50 UTC (rev 4190)
+++ trunk/pingus/src/lisp/parser.cpp 2011-08-28 21:17:09 UTC (rev 4191)
@@ -62,7 +62,7 @@
delete lexer;
}
-boost::shared_ptr<Lisp>
+std::shared_ptr<Lisp>
Parser::parse(const std::string& filename)
{
std::ifstream in(filename.c_str()); // FIXME: Temporary switched away from
physfs IFileStream
@@ -75,7 +75,7 @@
return parse(in, filename);
}
-boost::shared_ptr<Lisp>
+std::shared_ptr<Lisp>
Parser::parse(std::istream& stream, const std::string& filename)
{
std::unique_ptr<Parser> parser (new Parser());
@@ -87,7 +87,7 @@
if(parser->token != Lexer::TOKEN_OPEN_PAREN)
throw ParseError(parser.get(), "file doesn't start with '('");
- boost::shared_ptr<Lisp> result(parser->parse());
+ std::shared_ptr<Lisp> result(parser->parse());
if(parser->token != Lexer::TOKEN_EOF) {
if(parser->token == Lexer::TOKEN_CLOSE_PAREN)
throw ParseError(parser.get(), "too many ')'");
@@ -98,10 +98,10 @@
return result;
}
-boost::shared_ptr<Lisp>
+std::shared_ptr<Lisp>
Parser::parse()
{
- std::vector<boost::shared_ptr<Lisp> > entries;
+ std::vector<std::shared_ptr<Lisp> > entries;
while(token != Lexer::TOKEN_CLOSE_PAREN && token != Lexer::TOKEN_EOF) {
switch(token) {
case Lexer::TOKEN_OPEN_PAREN:
@@ -113,7 +113,7 @@
token = lexer->getNextToken();
if(token != Lexer::TOKEN_STRING)
throw ParseError(this, "Expected string after '(_' sequence");
- entries.push_back(boost::shared_ptr<Lisp>(new
Lisp(Lisp::TYPE_STRING, lexer->getString())));
+ entries.push_back(std::shared_ptr<Lisp>(new Lisp(Lisp::TYPE_STRING,
lexer->getString())));
token = lexer->getNextToken();
if(token != Lexer::TOKEN_CLOSE_PAREN)
@@ -130,28 +130,28 @@
}
break;
case Lexer::TOKEN_SYMBOL:
- entries.push_back(boost::shared_ptr<Lisp>(new Lisp(Lisp::TYPE_SYMBOL,
lexer->getString())));
+ entries.push_back(std::shared_ptr<Lisp>(new Lisp(Lisp::TYPE_SYMBOL,
lexer->getString())));
break;
case Lexer::TOKEN_STRING:
- entries.push_back(boost::shared_ptr<Lisp>(new Lisp(Lisp::TYPE_STRING,
lexer->getString())));
+ entries.push_back(std::shared_ptr<Lisp>(new Lisp(Lisp::TYPE_STRING,
lexer->getString())));
break;
case Lexer::TOKEN_INTEGER: {
int val;
sscanf(lexer->getString(), "%d", &val);
- entries.push_back(boost::shared_ptr<Lisp>(new Lisp(val)));
+ entries.push_back(std::shared_ptr<Lisp>(new Lisp(val)));
break;
}
case Lexer::TOKEN_REAL: {
float val;
sscanf(lexer->getString(), "%f", &val);
- entries.push_back(boost::shared_ptr<Lisp>(new Lisp(val)));
+ entries.push_back(std::shared_ptr<Lisp>(new Lisp(val)));
break;
}
case Lexer::TOKEN_TRUE:
- entries.push_back(boost::shared_ptr<Lisp>(new Lisp(true)));
+ entries.push_back(std::shared_ptr<Lisp>(new Lisp(true)));
break;
case Lexer::TOKEN_FALSE:
- entries.push_back(boost::shared_ptr<Lisp>(new Lisp(false)));
+ entries.push_back(std::shared_ptr<Lisp>(new Lisp(false)));
break;
default:
// this should never happen
@@ -161,7 +161,7 @@
token = lexer->getNextToken();
}
- return boost::shared_ptr<Lisp>(new Lisp(entries));
+ return std::shared_ptr<Lisp>(new Lisp(entries));
}
} // end of namespace lisp
Modified: trunk/pingus/src/lisp/parser.hpp
===================================================================
--- trunk/pingus/src/lisp/parser.hpp 2011-08-28 21:06:50 UTC (rev 4190)
+++ trunk/pingus/src/lisp/parser.hpp 2011-08-28 21:17:09 UTC (rev 4191)
@@ -18,7 +18,7 @@
#ifndef __LISPPARSER_H__
#define __LISPPARSER_H__
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <string>
#include "lexer.hpp"
@@ -32,15 +32,15 @@
{
public:
~Parser();
- static boost::shared_ptr<Lisp> parse(const std::string& filename);
- static boost::shared_ptr<Lisp> parse(std::istream& stream, const
std::string& filename = "");
+ static std::shared_ptr<Lisp> parse(const std::string& filename);
+ static std::shared_ptr<Lisp> parse(std::istream& stream, const std::string&
filename = "");
private:
friend class ParseError;
Parser();
- boost::shared_ptr<Lisp> parse();
+ std::shared_ptr<Lisp> parse();
std::string filename;
Lexer* lexer;
Modified: trunk/pingus/src/lisp/property_iterator.hpp
===================================================================
--- trunk/pingus/src/lisp/property_iterator.hpp 2011-08-28 21:06:50 UTC (rev
4190)
+++ trunk/pingus/src/lisp/property_iterator.hpp 2011-08-28 21:17:09 UTC (rev
4191)
@@ -8,11 +8,11 @@
{
struct ListEntry {
- ListEntry(const boost::shared_ptr<lisp::Lisp> lisp)
+ ListEntry(const std::shared_ptr<lisp::Lisp> lisp)
: lisp(lisp), used(false)
{}
- const boost::shared_ptr<lisp::Lisp> lisp;
+ const std::shared_ptr<lisp::Lisp> lisp;
bool used;
};
typedef std::multimap<std::string, ListEntry> PropertyMap;
Modified: trunk/pingus/src/pingus/components/button_panel.cpp
===================================================================
--- trunk/pingus/src/pingus/components/button_panel.cpp 2011-08-28 21:06:50 UTC
(rev 4190)
+++ trunk/pingus/src/pingus/components/button_panel.cpp 2011-08-28 21:17:09 UTC
(rev 4191)
@@ -16,6 +16,8 @@
#include "pingus/components/button_panel.hpp"
+#include <algorithm>
+
#include "engine/display/drawing_context.hpp"
#include "pingus/fonts.hpp"
#include "pingus/server.hpp"
Modified: trunk/pingus/src/pingus/config_manager.cpp
===================================================================
--- trunk/pingus/src/pingus/config_manager.cpp 2011-08-28 21:06:50 UTC (rev
4190)
+++ trunk/pingus/src/pingus/config_manager.cpp 2011-08-28 21:17:09 UTC (rev
4191)
@@ -56,7 +56,7 @@
{
filename = file;
- boost::shared_ptr<lisp::Lisp> sexpr;
+ std::shared_ptr<lisp::Lisp> sexpr;
try
{
Modified: trunk/pingus/src/pingus/pingu.cpp
===================================================================
--- trunk/pingus/src/pingus/pingu.cpp 2011-08-28 21:06:50 UTC (rev 4190)
+++ trunk/pingus/src/pingus/pingu.cpp 2011-08-28 21:17:09 UTC (rev 4191)
@@ -130,7 +130,7 @@
// When you select a function on the button panel and click on a
// pingu, this action will be called with the action name
bool
-Pingu::request_set_action(boost::shared_ptr<PinguAction> act)
+Pingu::request_set_action(std::shared_ptr<PinguAction> act)
{
bool ret_val = false;
assert(act);
@@ -244,7 +244,7 @@
// Sets an action without any checking
void
-Pingu::set_action(boost::shared_ptr<PinguAction> act)
+Pingu::set_action(std::shared_ptr<PinguAction> act)
{
assert(act);
@@ -345,7 +345,7 @@
{
set_action(countdown_action);
// Reset the countdown action handlers
- countdown_action = boost::shared_ptr<PinguAction>();
+ countdown_action = std::shared_ptr<PinguAction>();
action_time = -1;
return;
}
@@ -459,33 +459,33 @@
return action->catchable ();
}
-boost::shared_ptr<PinguAction>
+std::shared_ptr<PinguAction>
Pingu::create_action(ActionName::Enum action_)
{
switch(action_)
{
- case ActionName::ANGEL: return boost::shared_ptr<PinguAction>(new
Angel(this));
- case ActionName::BASHER: return boost::shared_ptr<PinguAction>(new
Basher(this));
- case ActionName::BLOCKER: return boost::shared_ptr<PinguAction>(new
Blocker(this));
- case ActionName::BOARDER: return boost::shared_ptr<PinguAction>(new
Boarder(this));
- case ActionName::BOMBER: return boost::shared_ptr<PinguAction>(new
Bomber(this));
- case ActionName::BRIDGER: return boost::shared_ptr<PinguAction>(new
Bridger(this));
- case ActionName::CLIMBER: return boost::shared_ptr<PinguAction>(new
Climber(this));
- case ActionName::DIGGER: return boost::shared_ptr<PinguAction>(new
Digger(this));
- case ActionName::DROWN: return boost::shared_ptr<PinguAction>(new
Drown(this));
- case ActionName::EXITER: return boost::shared_ptr<PinguAction>(new
Exiter(this));
- case ActionName::FALLER: return boost::shared_ptr<PinguAction>(new
Faller(this));
- case ActionName::FLOATER: return boost::shared_ptr<PinguAction>(new
Floater(this));
- case ActionName::JUMPER: return boost::shared_ptr<PinguAction>(new
Jumper(this));
- case ActionName::LASERKILL: return boost::shared_ptr<PinguAction>(new
LaserKill(this));
- case ActionName::MINER: return boost::shared_ptr<PinguAction>(new
Miner(this));
- case ActionName::ROCKETLAUNCHER: return boost::shared_ptr<PinguAction>(new
RocketLauncher(this));
- case ActionName::SLIDER: return boost::shared_ptr<PinguAction>(new
Slider(this));
- case ActionName::SMASHED: return boost::shared_ptr<PinguAction>(new
Smashed(this));
- case ActionName::SPLASHED: return boost::shared_ptr<PinguAction>(new
Splashed(this));
- case ActionName::SUPERMAN: return boost::shared_ptr<PinguAction>(new
Superman(this));
- case ActionName::WAITER: return boost::shared_ptr<PinguAction>(new
Waiter(this));
- case ActionName::WALKER: return boost::shared_ptr<PinguAction>(new
Walker(this));
+ case ActionName::ANGEL: return std::shared_ptr<PinguAction>(new
Angel(this));
+ case ActionName::BASHER: return std::shared_ptr<PinguAction>(new
Basher(this));
+ case ActionName::BLOCKER: return std::shared_ptr<PinguAction>(new
Blocker(this));
+ case ActionName::BOARDER: return std::shared_ptr<PinguAction>(new
Boarder(this));
+ case ActionName::BOMBER: return std::shared_ptr<PinguAction>(new
Bomber(this));
+ case ActionName::BRIDGER: return std::shared_ptr<PinguAction>(new
Bridger(this));
+ case ActionName::CLIMBER: return std::shared_ptr<PinguAction>(new
Climber(this));
+ case ActionName::DIGGER: return std::shared_ptr<PinguAction>(new
Digger(this));
+ case ActionName::DROWN: return std::shared_ptr<PinguAction>(new
Drown(this));
+ case ActionName::EXITER: return std::shared_ptr<PinguAction>(new
Exiter(this));
+ case ActionName::FALLER: return std::shared_ptr<PinguAction>(new
Faller(this));
+ case ActionName::FLOATER: return std::shared_ptr<PinguAction>(new
Floater(this));
+ case ActionName::JUMPER: return std::shared_ptr<PinguAction>(new
Jumper(this));
+ case ActionName::LASERKILL: return std::shared_ptr<PinguAction>(new
LaserKill(this));
+ case ActionName::MINER: return std::shared_ptr<PinguAction>(new
Miner(this));
+ case ActionName::ROCKETLAUNCHER: return std::shared_ptr<PinguAction>(new
RocketLauncher(this));
+ case ActionName::SLIDER: return std::shared_ptr<PinguAction>(new
Slider(this));
+ case ActionName::SMASHED: return std::shared_ptr<PinguAction>(new
Smashed(this));
+ case ActionName::SPLASHED: return std::shared_ptr<PinguAction>(new
Splashed(this));
+ case ActionName::SUPERMAN: return std::shared_ptr<PinguAction>(new
Superman(this));
+ case ActionName::WAITER: return std::shared_ptr<PinguAction>(new
Waiter(this));
+ case ActionName::WALKER: return std::shared_ptr<PinguAction>(new
Walker(this));
default: assert(!"Invalid action name provied");
}
}
Modified: trunk/pingus/src/pingus/pingu.hpp
===================================================================
--- trunk/pingus/src/pingus/pingu.hpp 2011-08-28 21:06:50 UTC (rev 4190)
+++ trunk/pingus/src/pingus/pingu.hpp 2011-08-28 21:17:09 UTC (rev 4191)
@@ -17,7 +17,7 @@
#ifndef HEADER_PINGUS_PINGUS_PINGU_HPP
#define HEADER_PINGUS_PINGUS_PINGU_HPP
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include "math/vector3f.hpp"
#include "pingus/direction.hpp"
@@ -44,17 +44,17 @@
private:
/** The primary action with is currently in use */
- boost::shared_ptr<PinguAction> action;
+ std::shared_ptr<PinguAction> action;
/** A secondary action which will turn active after a given amount of time
The only example is currently the bomber. */
- boost::shared_ptr<PinguAction> countdown_action;
+ std::shared_ptr<PinguAction> countdown_action;
/** the action that gets triggered when the pingu hits a wall */
- boost::shared_ptr<PinguAction> wall_action;
+ std::shared_ptr<PinguAction> wall_action;
/** the action that gets triggered when the pingu falls */
- boost::shared_ptr<PinguAction> fall_action;
+ std::shared_ptr<PinguAction> fall_action;
/** The previous_action contains the action type that was in action
before action got applied, its here to enable action to behave
@@ -80,10 +80,10 @@
Vector3f velocity;
private:
- bool request_set_action(boost::shared_ptr<PinguAction>);
- void set_action(boost::shared_ptr<PinguAction>);
+ bool request_set_action(std::shared_ptr<PinguAction>);
+ void set_action(std::shared_ptr<PinguAction>);
- boost::shared_ptr<PinguAction> create_action(ActionName::Enum action);
+ std::shared_ptr<PinguAction> create_action(ActionName::Enum action);
public:
Modified: trunk/pingus/src/pingus/pingus_level.hpp
===================================================================
--- trunk/pingus/src/pingus/pingus_level.hpp 2011-08-28 21:06:50 UTC (rev
4190)
+++ trunk/pingus/src/pingus/pingus_level.hpp 2011-08-28 21:17:09 UTC (rev
4191)
@@ -87,7 +87,7 @@
const Pathname& pathname);
protected:
- boost::shared_ptr<PingusLevelImpl> impl;
+ std::shared_ptr<PingusLevelImpl> impl;
};
#endif
Modified: trunk/pingus/src/pingus/resource_manager.cpp
===================================================================
--- trunk/pingus/src/pingus/resource_manager.cpp 2011-08-28 21:06:50 UTC
(rev 4190)
+++ trunk/pingus/src/pingus/resource_manager.cpp 2011-08-28 21:17:09 UTC
(rev 4191)
@@ -54,7 +54,7 @@
ResourceManager::add_resources(const std::string& filename)
{
pout(PINGUS_DEBUG_RESOURCES) << "ResourceManager: " << filename << std::endl;
- boost::shared_ptr<lisp::Lisp> sexpr = lisp::Parser::parse(filename);
+ std::shared_ptr<lisp::Lisp> sexpr = lisp::Parser::parse(filename);
if (sexpr)
{
SExprFileReader reader(sexpr->get_list_elem(0));
Modified: trunk/pingus/src/pingus/savegame_manager.cpp
===================================================================
--- trunk/pingus/src/pingus/savegame_manager.cpp 2011-08-28 21:06:50 UTC
(rev 4190)
+++ trunk/pingus/src/pingus/savegame_manager.cpp 2011-08-28 21:17:09 UTC
(rev 4191)
@@ -39,7 +39,7 @@
assert(instance_ == 0);
instance_ = this;
- boost::shared_ptr<lisp::Lisp> sexpr;
+ std::shared_ptr<lisp::Lisp> sexpr;
try
{
Modified: trunk/pingus/src/pingus/stat_manager.cpp
===================================================================
--- trunk/pingus/src/pingus/stat_manager.cpp 2011-08-28 21:06:50 UTC (rev
4190)
+++ trunk/pingus/src/pingus/stat_manager.cpp 2011-08-28 21:17:09 UTC (rev
4191)
@@ -74,7 +74,7 @@
save(filename);
}
- boost::shared_ptr<lisp::Lisp> sexpr;
+ std::shared_ptr<lisp::Lisp> sexpr;
try {
sexpr = lisp::Parser::parse(filename);
}
Modified: trunk/pingus/src/pingus/world.cpp
===================================================================
--- trunk/pingus/src/pingus/world.cpp 2011-08-28 21:06:50 UTC (rev 4190)
+++ trunk/pingus/src/pingus/world.cpp 2011-08-28 21:17:09 UTC (rev 4191)
@@ -16,6 +16,8 @@
#include "pingus/world.hpp"
+#include <algorithm>
+
#include "engine/display/scene_context.hpp"
#include "engine/sound/sound.hpp"
#include "pingus/collision_map.hpp"
Modified: trunk/pingus/src/pingus/worldmap/pingus_worldmap.hpp
===================================================================
--- trunk/pingus/src/pingus/worldmap/pingus_worldmap.hpp 2011-08-28
21:06:50 UTC (rev 4190)
+++ trunk/pingus/src/pingus/worldmap/pingus_worldmap.hpp 2011-08-28
21:17:09 UTC (rev 4191)
@@ -53,7 +53,7 @@
void parse_properties(const FileReader& reader);
protected:
- boost::shared_ptr<PingusWorldmapImpl> impl;
+ std::shared_ptr<PingusWorldmapImpl> impl;
};
#endif
Modified: trunk/pingus/src/pingus/worldmap/worldmap_story.cpp
===================================================================
--- trunk/pingus/src/pingus/worldmap/worldmap_story.cpp 2011-08-28 21:06:50 UTC
(rev 4190)
+++ trunk/pingus/src/pingus/worldmap/worldmap_story.cpp 2011-08-28 21:17:09 UTC
(rev 4191)
@@ -17,6 +17,7 @@
#include "pingus/worldmap/worldmap_story.hpp"
#include <stdexcept>
+#include <algorithm>
#include "pingus/fonts.hpp"
#include "pingus/gettext.h"
Modified: trunk/pingus/src/util/file_reader.cpp
===================================================================
--- trunk/pingus/src/util/file_reader.cpp 2011-08-28 21:06:50 UTC (rev
4190)
+++ trunk/pingus/src/util/file_reader.cpp 2011-08-28 21:17:09 UTC (rev
4191)
@@ -21,7 +21,7 @@
#include "util/pathname.hpp"
#include "util/sexpr_file_reader.hpp"
-FileReader::FileReader(boost::shared_ptr<FileReaderImpl> impl_) :
+FileReader::FileReader(std::shared_ptr<FileReaderImpl> impl_) :
impl(impl_)
{
}
@@ -194,7 +194,7 @@
FileReader
FileReader::parse(const std::string& filename)
{
- boost::shared_ptr<lisp::Lisp> sexpr = lisp::Parser::parse(filename);
+ std::shared_ptr<lisp::Lisp> sexpr = lisp::Parser::parse(filename);
if (sexpr)
{
return SExprFileReader(sexpr->get_list_elem(0));
@@ -214,7 +214,7 @@
std::vector<FileReader>
FileReader::parse_many(const Pathname& pathname)
{
- boost::shared_ptr<lisp::Lisp> sexpr =
lisp::Parser::parse(pathname.get_sys_path());
+ std::shared_ptr<lisp::Lisp> sexpr =
lisp::Parser::parse(pathname.get_sys_path());
if (sexpr)
{
std::vector<FileReader> sections;
Modified: trunk/pingus/src/util/file_reader.hpp
===================================================================
--- trunk/pingus/src/util/file_reader.hpp 2011-08-28 21:06:50 UTC (rev
4190)
+++ trunk/pingus/src/util/file_reader.hpp 2011-08-28 21:17:09 UTC (rev
4191)
@@ -17,7 +17,7 @@
#ifndef HEADER_PINGUS_UTIL_FILE_READER_HPP
#define HEADER_PINGUS_UTIL_FILE_READER_HPP
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <vector>
class Size;
@@ -35,7 +35,7 @@
class FileReader
{
public:
- FileReader(boost::shared_ptr<FileReaderImpl> impl_);
+ FileReader(std::shared_ptr<FileReaderImpl> impl_);
FileReader();
virtual ~FileReader() {}
@@ -82,7 +82,7 @@
static std::vector<FileReader> parse_many(const Pathname& pathname);
private:
- boost::shared_ptr<FileReaderImpl> impl;
+ std::shared_ptr<FileReaderImpl> impl;
};
#endif
Modified: trunk/pingus/src/util/sexpr_file_reader.cpp
===================================================================
--- trunk/pingus/src/util/sexpr_file_reader.cpp 2011-08-28 21:06:50 UTC (rev
4190)
+++ trunk/pingus/src/util/sexpr_file_reader.cpp 2011-08-28 21:17:09 UTC (rev
4191)
@@ -25,9 +25,9 @@
class SExprFileReaderImpl: public FileReaderImpl
{
public:
- boost::shared_ptr<lisp::Lisp> sexpr;
+ std::shared_ptr<lisp::Lisp> sexpr;
- SExprFileReaderImpl(boost::shared_ptr<lisp::Lisp> sexpr_)
+ SExprFileReaderImpl(std::shared_ptr<lisp::Lisp> sexpr_)
: sexpr(sexpr_)
{
assert(sexpr->get_type() == lisp::Lisp::TYPE_LIST &&
@@ -51,7 +51,7 @@
bool read_int (const char* name, int& v) const
{
- boost::shared_ptr<lisp::Lisp> item = get_subsection_item(name);
+ std::shared_ptr<lisp::Lisp> item = get_subsection_item(name);
if (item && item->get_type() == lisp::Lisp::TYPE_INT)
{
v = item->get_int();
@@ -62,7 +62,7 @@
bool read_float (const char* name, float& v) const
{
- boost::shared_ptr<lisp::Lisp> item = get_subsection_item(name);
+ std::shared_ptr<lisp::Lisp> item = get_subsection_item(name);
if (item)
{
if (item->get_type() == lisp::Lisp::TYPE_FLOAT)
@@ -85,7 +85,7 @@
bool read_bool (const char* name, bool& v) const
{
- boost::shared_ptr<lisp::Lisp> item = get_subsection_item(name);
+ std::shared_ptr<lisp::Lisp> item = get_subsection_item(name);
if (item && item->get_type() == lisp::Lisp::TYPE_BOOL)
{
v = item->get_bool();
@@ -101,13 +101,13 @@
bool read_string(const char* name, std::string& v) const
{
- boost::shared_ptr<lisp::Lisp> sub = get_subsection(name);
+ std::shared_ptr<lisp::Lisp> sub = get_subsection(name);
if (sub)
{
v = "";
for(size_t i = 1; i < sub->get_list_size(); ++i)
{
- boost::shared_ptr<lisp::Lisp> item = sub->get_list_elem(i);
+ std::shared_ptr<lisp::Lisp> item = sub->get_list_elem(i);
if (item->get_type() == lisp::Lisp::TYPE_STRING)
{
v += item->get_string();
@@ -124,7 +124,7 @@
bool read_vector(const char* name, Vector3f& v) const
{
- boost::shared_ptr<lisp::Lisp> sub = get_subsection(name);
+ std::shared_ptr<lisp::Lisp> sub = get_subsection(name);
if (sub && sub->get_list_size() == 4)
{
v = Vector3f(sub->get_list_elem(1)->get_float(),
@@ -137,7 +137,7 @@
bool read_size(const char* name, Size& v) const
{
- boost::shared_ptr<lisp::Lisp> sub = get_subsection(name);
+ std::shared_ptr<lisp::Lisp> sub = get_subsection(name);
if (sub && sub->get_list_size() == 3)
{
v.width = sub->get_list_elem(1)->get_int();
@@ -149,7 +149,7 @@
bool read_vector2i(const char* name, Vector2i& v) const
{
- boost::shared_ptr<lisp::Lisp> sub = get_subsection(name);
+ std::shared_ptr<lisp::Lisp> sub = get_subsection(name);
if (sub && sub->get_list_size() == 3)
{
v.x = sub->get_list_elem(1)->get_int();
@@ -161,7 +161,7 @@
bool read_rect(const char* name, Rect& rect) const
{
- boost::shared_ptr<lisp::Lisp> sub = get_subsection(name);
+ std::shared_ptr<lisp::Lisp> sub = get_subsection(name);
if (sub && sub->get_list_size() == 5)
{
rect.left = sub->get_list_elem(1)->get_int();
@@ -175,7 +175,7 @@
bool read_color (const char* name, Color& v) const
{
- boost::shared_ptr<lisp::Lisp> sub = get_subsection(name);
+ std::shared_ptr<lisp::Lisp> sub = get_subsection(name);
if (sub && sub->get_list_size() == 5)
{
v = Color(static_cast<char>(sub->get_list_elem(1)->get_float() * 255),
@@ -189,7 +189,7 @@
bool read_desc (const char* name, ResDescriptor& v) const
{
- boost::shared_ptr<lisp::Lisp> sub = get_subsection(name);
+ std::shared_ptr<lisp::Lisp> sub = get_subsection(name);
if (sub)
{
SExprFileReader reader(sub);
@@ -202,7 +202,7 @@
bool read_section(const char* name, FileReader& v) const
{
- boost::shared_ptr<lisp::Lisp> cur = get_subsection(name);
+ std::shared_ptr<lisp::Lisp> cur = get_subsection(name);
if (cur)
{
v = SExprFileReader(cur);
@@ -227,7 +227,7 @@
for(size_t i = 1; i < sexpr->get_list_size(); ++i)
{ // iterate over subsections
- boost::shared_ptr<lisp::Lisp> sub = sexpr->get_list_elem(i);
+ std::shared_ptr<lisp::Lisp> sub = sexpr->get_list_elem(i);
lst.push_back(sub->get_list_elem(0)->get_symbol());
}
@@ -235,31 +235,31 @@
}
private:
- boost::shared_ptr<lisp::Lisp> get_subsection_item(const char* name) const
+ std::shared_ptr<lisp::Lisp> get_subsection_item(const char* name) const
{
- boost::shared_ptr<lisp::Lisp> sub = get_subsection(name);
+ std::shared_ptr<lisp::Lisp> sub = get_subsection(name);
if (sub && sub->get_list_size() == 2)
{
return sub->get_list_elem(1);
}
- return boost::shared_ptr<lisp::Lisp>();
+ return std::shared_ptr<lisp::Lisp>();
}
- boost::shared_ptr<lisp::Lisp> get_subsection(const char* name) const
+ std::shared_ptr<lisp::Lisp> get_subsection(const char* name) const
{
for(size_t i = 1; i < sexpr->get_list_size(); ++i)
{ // iterate over subsections
- boost::shared_ptr<lisp::Lisp> sub = sexpr->get_list_elem(i);
+ std::shared_ptr<lisp::Lisp> sub = sexpr->get_list_elem(i);
if (strcmp(sub->get_list_elem(0)->get_symbol(), name) == 0)
return sub;
}
- return boost::shared_ptr<lisp::Lisp>();
+ return std::shared_ptr<lisp::Lisp>();
}
};
-SExprFileReader::SExprFileReader(boost::shared_ptr<lisp::Lisp> lisp)
- : FileReader(boost::shared_ptr<FileReaderImpl>(new
SExprFileReaderImpl(lisp)))
+SExprFileReader::SExprFileReader(std::shared_ptr<lisp::Lisp> lisp)
+ : FileReader(std::shared_ptr<FileReaderImpl>(new SExprFileReaderImpl(lisp)))
{
}
Modified: trunk/pingus/src/util/sexpr_file_reader.hpp
===================================================================
--- trunk/pingus/src/util/sexpr_file_reader.hpp 2011-08-28 21:06:50 UTC (rev
4190)
+++ trunk/pingus/src/util/sexpr_file_reader.hpp 2011-08-28 21:17:09 UTC (rev
4191)
@@ -24,7 +24,7 @@
{
private:
public:
- SExprFileReader(boost::shared_ptr<lisp::Lisp> lisp);
+ SExprFileReader(std::shared_ptr<lisp::Lisp> lisp);
};
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] r4191 - in trunk/pingus/src: engine/display engine/display/opengl engine/screen lisp pingus pingus/components pingus/worldmap util,
grumbel <=