summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorleo2000-08-24 21:24:42 +0000
committerleo2000-08-24 21:24:42 +0000
commit31a1d493ed4ca5d263244a8a3231111a58bdc5c4 (patch)
tree9963c933eb4fe42f257db26c7938009c4a88b0f4 /common
parente54d0ecfb00132cb4eeafb7d909f89c93a7b3ca6 (diff)
Updated the Windows version with the new Minifig Wizard.
Fixed some OpenGL problems on the Windows version. git-svn-id: http://svn.leocad.org/trunk@106 c7d43263-9d01-0410-8a33-9dba5d9f93d6
Diffstat (limited to 'common')
-rw-r--r--common/defines.h2
-rwxr-xr-xcommon/library.cpp1
-rwxr-xr-xcommon/object.cpp3
-rw-r--r--common/project.cpp5
4 files changed, 8 insertions, 3 deletions
diff --git a/common/defines.h b/common/defines.h
index f08cb40..9cb8391 100644
--- a/common/defines.h
+++ b/common/defines.h
@@ -85,7 +85,7 @@ unsigned long SwapLONG(unsigned long x)
#define ABS(a) (((a) > 0) ? (a) : -(a))
#endif
-#ifndef RGB
+#ifndef LC_WINDOWS
#define RGB(r, g, b) ((unsigned long)(((unsigned char) (r) | ((unsigned short) (g) << 8))|(((unsigned long) (unsigned char) (b)) << 16)))
#endif
diff --git a/common/library.cpp b/common/library.cpp
index af110c5..df7ab29 100755
--- a/common/library.cpp
+++ b/common/library.cpp
@@ -4,6 +4,7 @@
#include <malloc.h>
#include <string.h>
+#include <stdlib.h>
#include <math.h>
#include "defines.h"
#include "globals.h"
diff --git a/common/object.cpp b/common/object.cpp
index 2d75341..a26d2d5 100755
--- a/common/object.cpp
+++ b/common/object.cpp
@@ -3,6 +3,7 @@
#include <stdlib.h>
#include <float.h>
+#include <math.h>
#include "object.h"
#include "matrix.h"
#include "vector.h"
@@ -26,7 +27,7 @@ static void GetPolyCoeffs (float x1, float y1, float z1, float x2, float y2, flo
double LC_CLICKLINE::PointDistance (float *point)
{
- Vector op (point[0] - a1, point[1] - b1, point[2] - c1);
+ Vector op ((float)(point[0] - a1), (float)(point[1] - b1), (float)(point[2] - c1));
Vector d ((float)a2, (float)b2, (float)c2);
float len = d.Length ();
d.Normalize ();
diff --git a/common/project.cpp b/common/project.cpp
index 2b070ab..06efabe 100644
--- a/common/project.cpp
+++ b/common/project.cpp
@@ -289,7 +289,10 @@ bool Project::Initialize(int argc, char *argv[], char* binpath, char* libpath)
if (!loaded)
{
#ifdef LC_WINDOWS
- SystemDoMessageBox("Cannot load piece library.", LC_MB_OK|LC_MB_ICONERROR);
+ // let's hope this message helps the users
+ SystemDoMessageBox("Cannot load piece library.\n"
+ "Make sure that you have the PIECES.IDX file in the same "
+ "folder where you installed the program.", LC_MB_OK|LC_MB_ICONERROR);
#else
printf("Cannot load piece library !\n");
#endif