summaryrefslogtreecommitdiff
path: root/src/graphic
diff options
context:
space:
mode:
authorBjörn Steinbrink <B.Steinbrink@gmx.de>2005-08-13 12:49:52 +0000
committerBjörn Steinbrink <B.Steinbrink@gmx.de>2005-08-13 12:49:52 +0000
commit10b881f997384378a299bff358716db5183b65a5 (patch)
tree2231d834a69c1db68980c1ccefdc6586df351fc0 /src/graphic
parentda5a71f65682dbb3f830be4d5ffcd0046aa7b7ce (diff)
downloadmana-10b881f997384378a299bff358716db5183b65a5.tar.gz
mana-10b881f997384378a299bff358716db5183b65a5.tar.bz2
mana-10b881f997384378a299bff358716db5183b65a5.tar.xz
mana-10b881f997384378a299bff358716db5183b65a5.zip
Huge header cleanup to reduce dependencies and compile time.
Diffstat (limited to 'src/graphic')
-rw-r--r--src/graphic/imagerect.h50
-rw-r--r--src/graphic/spriteset.cpp2
-rw-r--r--src/graphic/spriteset.h4
3 files changed, 55 insertions, 1 deletions
diff --git a/src/graphic/imagerect.h b/src/graphic/imagerect.h
new file mode 100644
index 00000000..be63d4ac
--- /dev/null
+++ b/src/graphic/imagerect.h
@@ -0,0 +1,50 @@
+/*
+ * The Mana World
+ * Copyright 2004 The Mana World Development Team
+ *
+ * This file is part of The Mana World.
+ *
+ * The Mana World is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * any later version.
+ *
+ * The Mana World is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with The Mana World; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * $Id$
+ */
+
+#ifndef _TMW_IMAGERECT_H
+#define _TMW_IMAGERECT_H
+
+class Image;
+
+/**
+ * 9 images defining a rectangle. 4 corners, 4 sides and a middle area. The
+ * topology is as follows:
+ *
+ * <pre>
+ * !-----!-----------------!-----!
+ * ! 0 ! 1 ! 2 !
+ * !-----!-----------------!-----!
+ * ! 3 ! 4 ! 5 !
+ * !-----!-----------------!-----!
+ * ! 6 ! 7 ! 8 !
+ * !-----!-----------------!-----!
+ * </pre>
+ *
+ * Sections 0, 2, 6 and 8 will remain as is. 1, 3, 4, 5 and 7 will be
+ * repeated to fit the size of the widget.
+ */
+struct ImageRect {
+ Image *grid[9];
+};
+
+#endif
diff --git a/src/graphic/spriteset.cpp b/src/graphic/spriteset.cpp
index 31e84e9d..e0a1ef36 100644
--- a/src/graphic/spriteset.cpp
+++ b/src/graphic/spriteset.cpp
@@ -23,6 +23,8 @@
#include "spriteset.h"
+#include "../resources/image.h"
+
Spriteset::Spriteset(Image *img, int width, int height)
{
int x, y;
diff --git a/src/graphic/spriteset.h b/src/graphic/spriteset.h
index 6132330d..2f4e50ca 100644
--- a/src/graphic/spriteset.h
+++ b/src/graphic/spriteset.h
@@ -25,7 +25,9 @@
#define _TMW_SPRITESET_H
#include <vector>
-#include "../resources/image.h"
+
+class Image;
+
/**
* Stores a complete set of sprites.