Permalink
Browse files

+docs make target

+struct property storage (for structured properties)
+ Position prop now builtin
  • Loading branch information...
volca02 committed Dec 14, 2008
1 parent 76a8d83 commit b916180c53c0f8b50657db06a17986f7f2fb0a62
View
@@ -23,7 +23,7 @@ project (OPDE)
SET(OPDE_VER_MAJOR "0")
SET(OPDE_VER_MINOR "2")
-SET(OPDE_VER_PATCH "1")
+SET(OPDE_VER_PATCH "9")
SET(REL_CODE_NAME "Segmentation Fault")
# Build type selection. Use ccmake for selection of this (or the commandline switches)
@@ -38,11 +38,6 @@ OPTION(GLOBAL_DEBUG
"Build the debugging code"
OFF)
-# Option to build the documentation
-OPTION(GENERATE_DOC
- "Build the doxy documentation"
- OFF)
-
# Option to create Windows installer script
OPTION(GENERATE_NSIS
"Creates Windows installer script"
@@ -197,14 +192,52 @@ add_subdirectory (proto)
add_subdirectory (thirdparty)
# Generate the doxyfile if selected as an option
-IF (GENERATE_DOC)
+IF (UNIX AND PYTHON_LIBRARIES)
# Generate the doxyfile from the template file
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
${CMAKE_BINARY_DIR}/Doxyfile)
- MESSAGE(STATUS "Doxyfile was generated in ${CMAKE_BINARY_DIR}.")
- # You can run doxygen on that file to generate documentation...
-ENDIF (GENERATE_DOC)
+ # Now prepare the python doc. generator
+ CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/writedoc.py.in
+ ${CMAKE_BINARY_DIR}/writedoc.py)
+
+
+ FIND_PACKAGE(Doxygen REQUIRED)
+
+ # generates the Doxygen docs.
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_BINARY_DIR}/doc/main/html/index.html
+ COMMAND rm -rf ${CMAKE_BINARY_DIR}/main/doc/html
+ COMMAND mkdir -p ${CMAKE_BINARY_DIR}/main/doc/html
+ COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile
+ )
+
+ # generates the Python docs.
+ ADD_CUSTOM_COMMAND(
+ OUTPUT ${CMAKE_BINARY_DIR}/doc/python/html/index.html
+ COMMAND rm -rf ${CMAKE_BINARY_DIR}/doc/python/html
+ COMMAND mkdir -p ${CMAKE_BINARY_DIR}/doc/python/html
+ COMMAND ${CMAKE_BINARY_DIR}/src/main/opdeScript ${CMAKE_BINARY_DIR}/writedoc.py
+ )
+
+ # generates the property/link docs for all 3 versions of Dark
+ #ADD_CUSTOM_COMMAND(
+ # OUTPUT ${CMAKE_BINARY_DIR}/doc/python/html/index.html
+ # )
+
+ IF (DOXYGEN_EXECUTABLE)
+ ADD_CUSTOM_TARGET(docs ALL
+ DEPENDS
+ opdeScript
+ opdeDocGen
+ ${CMAKE_BINARY_DIR}/doc/html/index.html
+ ${CMAKE_BINARY_DIR}/doc/python/html/index.html
+ ${DOXYGEN_EXECUTABLE}
+ )
+ ELSE (DOXYGEN_EXECUTABLE)
+ MESSAGE("Warning: Doxygen not found, docs target disabled.")
+ ENDIF (DOXYGEN_EXECUTABLE)
+ENDIF (UNIX AND PYTHON_LIBRARIES)
IF (GENERATE_NSIS)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/installer/opde-win.in
View
10 NEWS
@@ -101,4 +101,12 @@ Changes in alpha release 0.2.1 (23-May-2007)
* Moved the code to Ogre3D 1.4
* Added dependency to OIS
* Various small fixes
-* Removed dependency on CeGUI
+* Removed dependency on CeGUI
+
+Changes in alpha release 0.2.9 (10-Oct-2008)
+* Implemented a propper static geometry rendering class
+* Added a image loading override that supports palletized transparency
+* Implemented python bindings code, great part of Opde can now be used from python
+* Implemented vis. blocking
+* Implemented lightning
+* Built-in properties now use built-in property declaration
@@ -1517,12 +1517,12 @@ property PsiPowerD {
p_ver 2.65540
}
-property Position {
- label "Position"
- p_ver 2.65558
- inherit never
- cached
-}
+//property Position {
+// label "Position"
+// p_ver 2.65558
+// inherit never
+// cached
+//}
property AI_Device {
label "AIDevice"
@@ -948,12 +948,12 @@ property StTweqBli {
inherit never
}
-property Position {
- label "Position"
- p_ver 2.65558
- inherit never
- cached
-}
+//property Position {
+// label "Position"
+// p_ver 2.65558
+// inherit never
+// cached
+//}
property AI_Device {
label "AIDevice"
@@ -1232,12 +1232,12 @@ property AIGunDesc {
p_ver 2.65566
}
-property Position {
- label "Position"
- p_ver 2.65558
- inherit never
- cached
-}
+//property Position {
+// label "Position"
+// p_ver 2.65558
+// inherit never
+// cached
+//}
property AI_Device {
label "AIDevice"
@@ -503,6 +503,7 @@ namespace Opde {
DataFieldDescList mEmptyList;
};
+
} // namespace Opde
#endif
@@ -38,7 +38,7 @@ namespace Opde {
DVariant::DVariant(Type t, void *val) {
mPrivate.isShared = false;
mPrivate.type = t;
-
+
switch (t) {
case DV_BOOL :
mPrivate.data.dbool = val ? *static_cast<bool *>(val) : false;
@@ -65,7 +65,7 @@ namespace Opde {
mPrivate.data.shared = new Shared<Vector3>(*static_cast<Vector3 *>(val));
mPrivate.isShared = 1;
break;
-
+
case DV_QUATERNION :
mPrivate.data.shared = new Shared<Quaternion>(*static_cast<Quaternion *>(val));
mPrivate.isShared = 1;
@@ -80,7 +80,7 @@ namespace Opde {
DVariant::DVariant(Type t, const std::string& txtval) {
mPrivate.isShared = false;
mPrivate.type = t;
-
+
switch (t) {
case DV_BOOL :
mPrivate.data.dbool = StringToBool(txtval);
@@ -107,7 +107,7 @@ namespace Opde {
mPrivate.data.shared = new Shared<Vector3>(StringToVector(txtval));
mPrivate.isShared = true;
break;
-
+
case DV_QUATERNION :
mPrivate.data.shared = new Shared<Quaternion>(StringToQuaternion(txtval));
mPrivate.isShared = true;
@@ -183,7 +183,7 @@ namespace Opde {
mPrivate.data.shared = new Shared<Vector3>(vec);
mPrivate.isShared = true;
}
-
+
//------------------------------------
DVariant::DVariant(const Quaternion& ori) {
mPrivate.type = DV_QUATERNION;
@@ -199,7 +199,7 @@ namespace Opde {
}
//------------------------------------
- DVariant::~DVariant() {
+ DVariant::~DVariant() {
if (mPrivate.isShared)
delete mPrivate.data.shared;
}
@@ -208,7 +208,7 @@ namespace Opde {
const char* DVariant::typeString() const {
return typeToString(mPrivate.type);
}
-
+
//------------------------------------
const char* DVariant::typeToString(DVariant::Type t) {
switch (t) {
@@ -405,16 +405,16 @@ namespace Opde {
}
} else // we did not have shared data, clone no matter what
mPrivate.data.shared = b.mPrivate.data.shared->clone();
-
-
+
+
mPrivate.isShared = true;
mPrivate.type = b.mPrivate.type;
} else {
// if was shared, release
if (mPrivate.isShared)
delete mPrivate.data.shared;
-
+
mPrivate = b.mPrivate;
}
@@ -583,7 +583,7 @@ namespace Opde {
case DV_VECTOR :
return shared_cast<Vector3>() == b.toVector();
-
+
case DV_QUATERNION :
return shared_cast<Quaternion>() == b.toQuaternion();
@@ -636,7 +636,7 @@ namespace Opde {
// make a vector3 out of the array, and return
return Vector3(vec[0], vec[1], vec[2]);
}
-
+
//------------------------------------
Quaternion DVariant::StringToQuaternion(const std::string& str) {
string src(str);
@@ -753,4 +753,47 @@ namespace Opde {
return fReturn;
}
+ //------------------------------------
+ template<> bool DVariant::as<bool>() const {
+ return toBool();
+ }
+
+ //------------------------------------
+ template<> float DVariant::as<float>() const {
+ return toFloat();
+ }
+
+ //------------------------------------
+ template<> int DVariant::as<int>() const {
+ return toInt();
+ }
+
+ //------------------------------------
+ template<> uint DVariant::as<uint>() const {
+ return toUInt();
+ }
+
+ //------------------------------------
+ template<> std::string DVariant::as<std::string>() const {
+ return toString();
+ }
+
+ //------------------------------------
+ template<> Vector3 DVariant::as<Vector3>() const {
+ return toVector();
+ }
+
+ //------------------------------------
+ template<> Ogre::Quaternion DVariant::as<Ogre::Quaternion>() const {
+ return toQuaternion();
+ }
+
+
+ template<> DVariant::Type DVariantTypeTraits<bool>::getType() { return DVariant::DV_BOOL; };
+ template<> DVariant::Type DVariantTypeTraits<float>::getType() { return DVariant::DV_FLOAT; };
+ template<> DVariant::Type DVariantTypeTraits<int32_t>::getType() { return DVariant::DV_INT; };
+ template<> DVariant::Type DVariantTypeTraits<uint32_t>::getType() { return DVariant::DV_UINT; };
+ template<> DVariant::Type DVariantTypeTraits<std::string>::getType() { return DVariant::DV_STRING; };
+ template<> DVariant::Type DVariantTypeTraits<Vector3>::getType() { return DVariant::DV_VECTOR; };
+ template<> DVariant::Type DVariantTypeTraits<Quaternion>::getType() { return DVariant::DV_QUATERNION; };
}
Oops, something went wrong.

0 comments on commit b916180

Please sign in to comment.