summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjørn Lindeijer <bjorn@lindeijer.nl>2006-08-29 21:13:23 +0000
committerBjørn Lindeijer <bjorn@lindeijer.nl>2006-08-29 21:13:23 +0000
commited6e43cbbe1e9a93fb58eccbbec1d377f094d73e (patch)
tree292a6d7176f09453f6aaf5077a8570328ba7acea
parent91705f88735b8efdbf263a22ef02c1b87c964b5b (diff)
downloadmana-client-ed6e43cbbe1e9a93fb58eccbbec1d377f094d73e.tar.gz
mana-client-ed6e43cbbe1e9a93fb58eccbbec1d377f094d73e.tar.bz2
mana-client-ed6e43cbbe1e9a93fb58eccbbec1d377f094d73e.tar.xz
mana-client-ed6e43cbbe1e9a93fb58eccbbec1d377f094d73e.zip
Updated NEWS file and made getAll return a reference instead of a pointer.
-rw-r--r--ChangeLog7
-rw-r--r--NEWS3
-rw-r--r--src/beingmanager.cpp4
-rw-r--r--src/beingmanager.h2
-rw-r--r--src/engine.cpp4
-rw-r--r--src/gui/minimap.cpp4
-rw-r--r--src/map.cpp4
7 files changed, 18 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 7ec11202..83515fe4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2006-08-29 Bjørn Lindeijer <bjorn@lindeijer.nl>
+
+ * src/map.cpp, src/beingmanager.h, src/gui/minimap.cpp,
+ src/engine.cpp, src/beingmanager.cpp: It's better to use a reference
+ when you don't need a pointer.
+ * NEWS: Updated with addition of config file option.
+
2006-08-29 Andrew Harrison <atharris@users.sourceforge.net>
* src/main.cpp: Added command line option to specify which
diff --git a/NEWS b/NEWS
index cf837a25..0c42084b 100644
--- a/NEWS
+++ b/NEWS
@@ -3,7 +3,8 @@
- Added XP bar to ministatus in the top left
- Added configurable smooth and lazy scrolling
- Added option to turn off the joystick
-- Added --playername command line option for automatic character picking
+- Added --playername option for automatic character picking
+- Added --configfile option for specifying which configuration file to use
- Fixed updating system on Windows
- Fixed player animations going out of sync on changing equipment or hairstyle
- Fixed SDL_image configure check on some systems by first checking for libpng
diff --git a/src/beingmanager.cpp b/src/beingmanager.cpp
index 10123d06..25edeb24 100644
--- a/src/beingmanager.cpp
+++ b/src/beingmanager.cpp
@@ -119,9 +119,9 @@ Being* BeingManager::findBeing(Uint16 x, Uint16 y, Being::Type type)
return (i == mBeings.end()) ? NULL : *i;
}
-Beings* BeingManager::getAll()
+Beings& BeingManager::getAll()
{
- return &mBeings;
+ return mBeings;
}
void BeingManager::logic()
diff --git a/src/beingmanager.h b/src/beingmanager.h
index bb6fc99b..cfaf7fbf 100644
--- a/src/beingmanager.h
+++ b/src/beingmanager.h
@@ -71,7 +71,7 @@ class BeingManager
/**
* Returns the whole list of beings
*/
- Beings* getAll();
+ Beings& getAll();
/**
* Logic.
diff --git a/src/engine.cpp b/src/engine.cpp
index 557b5d7e..868454d4 100644
--- a/src/engine.cpp
+++ b/src/engine.cpp
@@ -275,8 +275,8 @@ void Engine::draw(Graphics *graphics)
}
// Draw player nickname, speech, and emotion sprite as needed
- Beings *beings = beingManager->getAll();
- for (BeingIterator i = beings->begin(); i != beings->end(); i++)
+ Beings &beings = beingManager->getAll();
+ for (BeingIterator i = beings.begin(); i != beings.end(); i++)
{
(*i)->drawSpeech(graphics, -(int)view_x, -(int)view_y);
(*i)->drawName(graphics, -(int)view_x, -(int)view_y);
diff --git a/src/gui/minimap.cpp b/src/gui/minimap.cpp
index db6d4f15..69c5eb6e 100644
--- a/src/gui/minimap.cpp
+++ b/src/gui/minimap.cpp
@@ -76,10 +76,10 @@ void Minimap::draw(gcn::Graphics *graphics)
mMapImage, getPadding(), getTitleBarHeight());
}
- Beings *beings = beingManager->getAll();
+ Beings &beings = beingManager->getAll();
BeingIterator bi;
- for (bi = beings->begin(); bi != beings->end(); bi++)
+ for (bi = beings.begin(); bi != beings.end(); bi++)
{
Being *being = (*bi);
int dotSize = 1;
diff --git a/src/map.cpp b/src/map.cpp
index 027a5440..41282ddd 100644
--- a/src/map.cpp
+++ b/src/map.cpp
@@ -329,8 +329,8 @@ Map::getWalk(int x, int y)
}
// Check for collision with a being
- Beings *beings = beingManager->getAll();
- for (BeingIterator i = beings->begin(); i != beings->end(); i++) {
+ Beings &beings = beingManager->getAll();
+ for (BeingIterator i = beings.begin(); i != beings.end(); i++) {
// job 45 is a portal, they don't collide
if ((*i)->mX == x && (*i)->mY == y && (*i)->mJob != 45) {
return false;