Switched to a new coding style, which plays nicely with the Reader/Writer. This new style allows REFLECT to be used instead of REFLECT_N in most places.

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@15 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2006-10-11 22:26:55 +00:00
parent 33abea6221
commit 9de743030e
51 changed files with 1041 additions and 767 deletions
+5 -5
View File
@@ -14,7 +14,7 @@
// Rotates an image
// 'Rotater' is a function object that knows how to 'rotate' a pixel coordinate
template <class Rotater>
Image rotateImageImpl(Image img) {
Image rotate_image_impl(Image img) {
UInt width = img.GetWidth(), height = img.GetHeight();
// initialize the return image
Image ret;
@@ -83,13 +83,13 @@ struct Rotate270 {
// ----------------------------------------------------------------------------- : Interface
Image rotateImageBy(const Image& image, int angle) {
Image rotate_image(const Image& image, int angle) {
if (angle == 90) {
return rotateImageImpl<Rotate90>(image);
return rotate_image_impl<Rotate90>(image);
} else if (angle == 180){
return rotateImageImpl<Rotate180>(image);
return rotate_image_impl<Rotate180>(image);
} else if (angle == 270){
return rotateImageImpl<Rotate270>(image);
return rotate_image_impl<Rotate270>(image);
} else{
return image;
}