Author: mordante
Date: Thu May 22 18:32:19 2008
New Revision: 26776
URL: http://svn.gna.org/viewcvs/wesnoth?rev=26776&view=rev
Log:
Update doxygen comment style.
Modified:
trunk/src/unit_frame.cpp
trunk/src/unit_frame.hpp
Modified: trunk/src/unit_frame.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_frame.cpp?rev=26776&r1=26775&r2=26776&view=diff
==============================================================================
--- trunk/src/unit_frame.cpp (original)
+++ trunk/src/unit_frame.cpp Thu May 22 18:32:19 2008
@@ -12,8 +12,7 @@
See the COPYING file for more details.
*/
-//! @file unit_frame.cpp
-//!
+/** @file unit_frame.cpp */
#include "global.hpp"
#include "sound.hpp"
@@ -430,8 +429,10 @@
surface image;
if(!image_loc.is_void() && image_loc.get_filename() != "") { // invalid
diag image, or not diagonal
- //! TODO cache handling: here we will use the image again soon
- // we should cache it here and release it (if needed) after
redrawn
+ /**
+ * @todo cache handling: here we will use the image again soon
we
+ * should cache it here and release it (if needed) after redrawn
+ */
image=image::get_image(image_loc,
image::SCALED_TO_ZOOM,
false
@@ -440,14 +441,15 @@
const int x = static_cast<int>(tmp_offset * xdst + (1.0-tmp_offset) *
xsrc)+current_data.x;
const int y = static_cast<int>(tmp_offset * ydst + (1.0-tmp_offset) *
ysrc)+current_data.y;
if (image != NULL) {
- //! optimization for most common case
- if(x==xsrc && y == ysrc &&
- image->w ==
game_display::get_singleton()->hex_size() &&
- image->h ==
game_display::get_singleton()->hex_size()) {
- game_display::get_singleton()->invalidate(src);
- } else {
-
game_display::get_singleton()->invalidate_zone(x,y,x+image->w,y+image->h);
- }
+ // optimization for most common case
+ if(x==xsrc && y == ysrc &&
+ image->w ==
game_display::get_singleton()->hex_size() &&
+ image->h ==
game_display::get_singleton()->hex_size()) {
+
+ game_display::get_singleton()->invalidate(src);
+ } else {
+
game_display::get_singleton()->invalidate_zone(x,y,x+image->w,y+image->h);
+ }
}
}
@@ -456,14 +458,15 @@
const frame_parameters unit_frame::merge_parameters(int current_time,const
frame_parameters & animation_val,const frame_parameters & engine_val, bool
primary) const
{
- /*! this function merges the value provided by
+ /**
+ * this function merges the value provided by
* * the frame
* * the engine (poison, flying unit...)
* * the animation as a whole
* there is no absolute rule for merging, so creativity is the rule
* if a value is never provided by the engine, assert. (this way if it
becomes used, people will easily find the right place to look)
*
- * */
+ */
frame_parameters result;
const frame_parameters & current_val =
builder_.parameters(current_time);
assert(engine_val.image.is_void() || engine_val.image.get_filename() ==
"");
Modified: trunk/src/unit_frame.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/unit_frame.hpp?rev=26776&r1=26775&r2=26776&view=diff
==============================================================================
--- trunk/src/unit_frame.hpp (original)
+++ trunk/src/unit_frame.hpp Thu May 22 18:32:19 2008
@@ -12,8 +12,10 @@
See the COPYING file for more details.
*/
-//! @file unit_frame.hpp
-//! Frame for unit's animation sequence.
+/**
+ * @file unit_frame.hpp
+ * Frame for unit's animation sequence.
+ */
#ifndef UNIT_FRAME_H_INCLUDED
#define UNIT_FRAME_H_INCLUDED
@@ -29,7 +31,6 @@
#include <string>
#include <vector>
-//
class progressive_string {
public:
progressive_string(const std::string& data = "",int duration =
0);
@@ -62,7 +63,7 @@
// This hack prevents MSVC++ 6 to issue several warnings
#ifndef UNIT_FRAME_H_PART2
#define UNIT_FRAME_H_PART2
-//! All parameters from a frame at a given instant
+/** All parameters from a frame at a given instant */
class frame_parameters{
public:
frame_parameters():
@@ -103,10 +104,13 @@
int x;
int y;
} ;
-//! keep most parameters in a separate class to simplify handling of large
number of parameters
+/**
+ * keep most parameters in a separate class to simplify handling of large
+ * number of parameters
+ */
class frame_builder {
public:
- //! initial constructor
+ /** initial constructor */
frame_builder():
image_(image::locator()),
image_diagonal_(image::locator()),
@@ -127,7 +131,7 @@
y_("")
{};
frame_builder(const config& cfg,const std::string &frame_string
= "");
- //! allow easy chained modifications will raised assert if used
after initialization
+ /** allow easy chained modifications will raised assert if used
after initialization */
frame_builder & image(const image::locator image ,const
std::string & image_mod="");
frame_builder & image_diagonal(const image::locator
image_diagonal,const std::string & image_mod="");
frame_builder & sound(const std::string& sound);
@@ -140,7 +144,7 @@
frame_builder & submerge(const std::string& submerge);
frame_builder & x(const std::string& x);
frame_builder & y(const std::string& y);
- //! getters for the different parameters
+ /** getters for the different parameters */
const frame_parameters parameters(int current_time) const ;
int duration() const{ return duration_;};
@@ -167,7 +171,8 @@
progressive_int y_;
};
-//! Describe a unit's animation sequence.
+
+/** Describe a unit's animation sequence. */
class unit_frame {
public:
// Constructors
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits