Update of /cvsroot/gcblue/gcb_wx/src/scriptinterface
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv23922/src/scriptinterface
Modified Files:
tcPlatformInterface.cpp tcPlatformInterfaceExtensionB.cpp
Log Message:
Index: tcPlatformInterface.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcPlatformInterface.cpp,v
retrieving revision 1.64
retrieving revision 1.65
diff -C2 -d -r1.64 -r1.65
*** tcPlatformInterface.cpp 5 Sep 2006 01:04:25 -0000 1.64
--- tcPlatformInterface.cpp 16 Sep 2006 14:01:24 -0000 1.65
***************
*** 101,105 ****
}
-
/**
* @return fraction of fuel remaining
--- 101,104 ----
***************
*** 254,257 ****
--- 253,290 ----
+ bool tcPlatformInterface::IsSurface() const
+ {
+ return (mpPlatformObj->mnModelType == MTYPE_SURFACE);
+ }
+
+ /// returns true if platform is an air platform
+ bool tcPlatformInterface::IsAir() const
+ {
+ UINT32 nModelType = mpPlatformObj->mnModelType;
+ return (nModelType == MTYPE_FIXEDWING)||(nModelType == MTYPE_FIXEDWINGX)
+ ||(nModelType == MTYPE_AIR)||(nModelType == MTYPE_HELO);
+ }
+
+ /// returns true if platform is a helo
+ bool tcPlatformInterface::IsHelo() const
+ {
+ return (mpPlatformObj->mnModelType == MTYPE_HELO);
+ }
+
+ bool tcPlatformInterface::IsFixed() const
+ {
+ return (mpPlatformObj->mnModelType == MTYPE_FIXED) ||
+ (mpPlatformObj->mnModelType == MTYPE_AIRFIELD);
+ }
+
+ /// returns true if platform is a submarine
+ bool tcPlatformInterface::IsSub() const
+ {
+ return (mpPlatformObj->mnModelType == MTYPE_SUBMARINE);
+ }
+
+
+
+
tcGameObject* tcPlatformInterface::GetTargetObj()
{
Index: tcPlatformInterfaceExtensionB.cpp
===================================================================
RCS file: /cvsroot/gcblue/gcb_wx/src/scriptinterface/tcPlatformInterfaceExtensionB.cpp,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** tcPlatformInterfaceExtensionB.cpp 17 Aug 2006 01:28:04 -0000 1.32
--- tcPlatformInterfaceExtensionB.cpp 16 Sep 2006 14:01:24 -0000 1.33
***************
*** 76,81 ****
.def("GetName", &tcPlatformInterface::GetPlatformName)
.def("GetClass", &tcPlatformInterface::GetPlatformClass)
! .def("IsSurface",&tcPlatformInterface::IsSurface)
.def("IsAir", &tcPlatformInterface::IsAir)
.def("IsHelo", &tcPlatformInterface::IsHelo)
.def("IsSub", &tcPlatformInterface::IsSub)
--- 76,82 ----
.def("GetName", &tcPlatformInterface::GetPlatformName)
.def("GetClass", &tcPlatformInterface::GetPlatformClass)
! .def("IsSurface", &tcPlatformInterface::IsSurface)
.def("IsAir", &tcPlatformInterface::IsAir)
+ .def("IsFixed", &tcPlatformInterface::IsFixed)
.def("IsHelo", &tcPlatformInterface::IsHelo)
.def("IsSub", &tcPlatformInterface::IsSub)
|