Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-12-21 15:23:16 +0000
committerStijn Buys <ingar@osirion.org>2008-12-21 15:23:16 +0000
commit7d06239dcc150a7bd2521972ee680fd2c9003580 (patch)
tree777070bc639132c12418b33002e3159f7415152f /src
parent7857210368178b26b8f863a296094518aaff5174 (diff)
win32 build updates
Diffstat (limited to 'src')
-rw-r--r--src/client/map.cc3
-rw-r--r--src/render/image.cc2
-rw-r--r--src/render/jpgfile.cc6
-rw-r--r--src/ui/widget.cc4
4 files changed, 11 insertions, 4 deletions
diff --git a/src/client/map.cc b/src/client/map.cc
index 4613ab7..7d1536d 100644
--- a/src/client/map.cc
+++ b/src/client/map.cc
@@ -186,4 +186,5 @@ bool Map::on_keypress(const int key, const unsigned int modifier)
return false;
}
-} \ No newline at end of file
+
+}
diff --git a/src/render/image.cc b/src/render/image.cc
index e740d56..196eec9 100644
--- a/src/render/image.cc
+++ b/src/render/image.cc
@@ -62,7 +62,7 @@ void Image::pad()
for (size_t y =0; y < h; y++) {
memcpy((void *)&image_new[y * image_width * image_channels],
- (void *)image_data[y * w * image_channels], (size_t) w);
+ (void *)&image_data[y * w * image_channels], (size_t) w);
}
free(image_data);
diff --git a/src/render/jpgfile.cc b/src/render/jpgfile.cc
index 872233f..7713a07 100644
--- a/src/render/jpgfile.cc
+++ b/src/render/jpgfile.cc
@@ -18,6 +18,12 @@ http://www.zarb.org/~gc/html/libpng.html
#include "render/jpgfile.h"
#include "sys/sys.h"
+// work around for the win32 build
+#ifdef _WIN32
+#ifdef HAVE_STDLIB_H
+#undef HAVE_STDLIB_H
+#endif
+#endif
extern "C" {
#include "jpeglib.h"
}
diff --git a/src/ui/widget.cc b/src/ui/widget.cc
index 1270997..a7c667e 100644
--- a/src/ui/widget.cc
+++ b/src/ui/widget.cc
@@ -255,7 +255,7 @@ Widget *Widget::find_input_focus()
if (!visible() || !widget_focus)
return 0;
- for (Children::const_reverse_iterator rit = widget_children.rbegin(); rit != widget_children.rend(); ++rit) {
+ for (Children::reverse_iterator rit = widget_children.rbegin(); rit != widget_children.rend(); ++rit) {
Widget *w = (*rit);
if (w->visible() && w->widget_focus) {
Widget *f = w->find_input_focus();
@@ -275,7 +275,7 @@ Widget *Widget::find_mouse_focus(const math::Vector2f & pos)
return 0;
// reverse-iterate children
- for (Children::const_reverse_iterator rit = widget_children.rbegin(); rit != widget_children.rend(); ++rit) {
+ for (Children::reverse_iterator rit = widget_children.rbegin(); rit != widget_children.rend(); ++rit) {
Widget *w = (*rit);
if (w->visible()) {
Widget *f = w->find_mouse_focus(pos - w->location());