• R/O
  • SSH
  • HTTPS

gd10: Commit


Commit MetaInfo

Revisão111 (tree)
Hora2019-08-09 04:04:20
Autorhgtterry

Mensagem de Log

Entities change Environment Change Level Change Area 080819

Mudança Sumário

Diff

--- Equity10/GD10_Objects_New.cpp (revision 110)
+++ Equity10/GD10_Objects_New.cpp (revision 111)
@@ -982,6 +982,117 @@
982982 Object->Folder = Enums::Folder_Teleports;
983983 Object->Physics_Valid = 1;
984984
985+ HTREEITEM Temp = App->GDCL_FileView->Add_Area_Change(Object->Name, Index);
986+ Object->ListViewItem = Temp;
987+
988+ ShowWindow(App->GD_Properties_Hwnd, 1);
989+
990+ App->GDCL_Scene_Data->ObjectCount++; // Must be last line
991+ return 1;
992+}
993+
994+// *************************************************************************
995+// Add_New_Change_Level Terry Bernie *
996+// *************************************************************************
997+bool GD10_Objects_New::Add_New_Change_Level()
998+{
999+ int Index = App->GDCL_Scene_Data->ObjectCount;
1000+
1001+ App->GDCL_Scene_Data->CL_Object[Index] = new GD10_Objects();
1002+ App->GDCL_Scene_Data->CL_Object[Index]->Object_ID = App->GDCL_Scene_Data->Object_ID_Counter;
1003+
1004+ // Only on newly created objects
1005+ App->GDCL_Scene_Data->Object_ID_Counter++;
1006+
1007+ GD10_Objects* Object = App->GDCL_Scene_Data->CL_Object[Index];
1008+
1009+ // Create Teleport and use Player Start Position as Default
1010+ App->GDCL_Scene_Data->CL_Object[Index]->S_Teleport[0] = new Teleport_type2;
1011+
1012+ strcpy(App->GDCL_Scene_Data->CL_Object[Index]->S_Teleport[0]->Name, App->GDCL_Scene_Data->S_Player_Locations[0]->Name);
1013+ App->GDCL_Scene_Data->CL_Object[Index]->S_Teleport[0]->Player_Position = App->GDCL_Scene_Data->S_Player_Locations[0]->Current_Position;
1014+ App->GDCL_Scene_Data->CL_Object[Index]->S_Teleport[0]->Physics_Position = App->GDCL_Scene_Data->S_Player_Locations[0]->Physics_Position;
1015+ App->GDCL_Scene_Data->CL_Object[Index]->S_Teleport[0]->Physics_Rotation = App->GDCL_Scene_Data->S_Player_Locations[0]->Physics_Rotation;
1016+
1017+ // Create Sound
1018+ App->GDCL_Scene_Data->CL_Object[Index]->HasSound = 1;
1019+ App->GDCL_Scene_Data->CL_Object[Index]->S_Sounds[0] = new Sound_Type2;
1020+ App->GDCL_Scene_Data->CL_Object[Index]->Set_Sound_Defaults();
1021+
1022+ strcpy(App->GDCL_Scene_Data->CL_Object[Index]->Entity[0].mTextItem, "Test Text");
1023+
1024+ App->GDCL_Scene_Data->CL_Object[Index]->Type = Enums::Bullet_Type_Static;
1025+ App->GDCL_Scene_Data->CL_Object[Index]->Shape = Enums::Shape_Box;
1026+
1027+ strcpy(App->GDCL_Scene_Data->CL_Object[Index]->MeshName, "TeleportSend.mesh");
1028+
1029+ char ConNum[256];
1030+ char ATest[256];
1031+ char Name[256];
1032+
1033+ strcpy_s(Name, "Env_");
1034+ itoa(Index, ConNum, 10);
1035+ strcat(Name, ConNum);
1036+
1037+ strcpy_s(ATest, "GDEnt_");
1038+ itoa(Index, ConNum, 10);
1039+ strcat(ATest, ConNum);
1040+
1041+ strcpy(Object->Name, Name);
1042+ strcpy(Object->MeshName, "TeleportSend.mesh"); // Needs Chaning to Environment
1043+ strcpy(Object->MeshName_FullPath, "TeleportSend.mesh");
1044+
1045+ Object->OgreEntity = App->Cl_Ogre->mSceneMgr->createEntity(ATest, "TeleportSend.mesh", App->Cl_Ogre->PermResourceGroup);
1046+ Object->OgreNode = App->Cl_Ogre->mSceneMgr->getRootSceneNode()->createChildSceneNode();
1047+ Object->OgreNode->attachObject(Object->OgreEntity);
1048+ Object->OgreNode->scale(1, 1, 1);
1049+
1050+ Ogre::Vector3 Pos = Object->GetPlacement();
1051+ Object->Mesh_Pos = Pos;
1052+ Object->OgreNode->setPosition(Pos);
1053+ //------------------
1054+
1055+ Ogre::Vector3 Size = App->CL10_Objects_Com->GetMesh_BB_Size(Object->OgreNode);
1056+ float sx = Size.x / 2;
1057+ float sy = Size.y / 2; // Size by Bounding Box
1058+ float sz = Size.z / 2;
1059+
1060+ Object->Physics_Size = Ogre::Vector3(sx, sy, sz);
1061+
1062+ btCollisionShape* newRigidShape = new btBoxShape(btVector3(sx, sy, sz));
1063+ newRigidShape->calculateLocalInertia(0, btVector3(0, 0, 0));
1064+
1065+ btTransform startTransform;
1066+ startTransform.setIdentity();
1067+ startTransform.setRotation(btQuaternion(0.0f, 0.0f, 0.0f, 1));
1068+
1069+ Ogre::Vector3 Centre = Object->Get_BoundingBox_World_Centre();
1070+ Object->Physics_Pos = Ogre::Vector3(Centre.x, Centre.y, Centre.z);
1071+
1072+ btVector3 initialPosition(btVector3(Centre.x, Centre.y, Centre.z));
1073+ startTransform.setOrigin(initialPosition);
1074+
1075+ btDefaultMotionState* myMotionState = new btDefaultMotionState(startTransform);
1076+
1077+ btRigidBody::btRigidBodyConstructionInfo rbInfo(0, myMotionState, newRigidShape, btVector3(0, 0, 0));
1078+
1079+ Object->bt_body = new btRigidBody(rbInfo);
1080+ Object->bt_body->setRestitution(1.0);
1081+ Object->bt_body->setFriction(1.5);
1082+ Object->bt_body->setUserPointer(Object->OgreNode);
1083+ Object->bt_body->setWorldTransform(startTransform);
1084+
1085+ Object->bt_body->setCollisionFlags(btCollisionObject::CF_KINEMATIC_OBJECT | btCollisionObject::CF_NO_CONTACT_RESPONSE);
1086+
1087+ Object->Usage = Enums::Usage_Teleport;
1088+ Object->bt_body->setUserIndex(Enums::Usage_Teleport);
1089+ Object->bt_body->setUserIndex2(Index);
1090+
1091+ App->GDCL_Bullet->dynamicsWorld->addRigidBody(Object->bt_body);
1092+
1093+ Object->Folder = Enums::Folder_Teleports;
1094+ Object->Physics_Valid = 1;
1095+
9851096 HTREEITEM Temp = App->GDCL_FileView->Add_Environment(Object->Name, Index);
9861097 Object->ListViewItem = Temp;
9871098
@@ -991,7 +1102,6 @@
9911102 return 1;
9921103 }
9931104
994-
9951105 // *************************************************************************
9961106 // Add_New_Physics_Static_Box Terry Bernie *
9971107 // *************************************************************************
--- Equity10/GD10_Objects_New.h (revision 110)
+++ Equity10/GD10_Objects_New.h (revision 111)
@@ -38,6 +38,7 @@
3838 bool Add_New_TeleportEntity();
3939 bool Add_New_EnvironmentEntity();
4040 bool Add_New_Area_Change();
41+ bool Add_New_Change_Level();
4142
4243 bool Add_New_Area(void);
4344
--- Equity10/GD_FileView.cpp (revision 110)
+++ Equity10/GD_FileView.cpp (revision 111)
@@ -860,7 +860,7 @@
860860 bool Doit = App->GDCL_Dialogs->Canceled;
861861 if (Doit == 0)
862862 {
863- App->CL10_Objects_New->Add_New_EnvironmentEntity();
863+ App->CL10_Objects_New->Add_New_Change_Level();
864864 }
865865
866866 return;
@@ -1236,6 +1236,54 @@
12361236 }
12371237
12381238 // *************************************************************************
1239+// * Add_Area_Change Terry Bernie *
1240+// *************************************************************************
1241+HTREEITEM GD_FileView::Add_Area_Change(char* SFileName, int Index)
1242+{
1243+ HWND Temp2 = GetDlgItem(App->ListPanel, IDC_TREE1);
1244+
1245+ tvinsert.hParent = GD_Area_Change_Folder;
1246+ tvinsert.hInsertAfter = TVI_LAST;
1247+ tvinsert.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM;
1248+ tvinsert.item.pszText = SFileName;
1249+ tvinsert.item.iImage = 4;
1250+ tvinsert.item.iSelectedImage = 5;
1251+ tvinsert.item.lParam = Index;
1252+ HTREEITEM Temp = (HTREEITEM)SendDlgItemMessage(App->ListPanel, IDC_TREE1, TVM_INSERTITEM, 0, (LPARAM)& tvinsert);
1253+
1254+ if (App->GDCL_Load_Scene->File_Is_Loading == 0)
1255+ {
1256+ TreeView_Select(Temp2, Temp, TVGN_CARET);
1257+ }
1258+
1259+ return Temp;
1260+}
1261+
1262+// *************************************************************************
1263+// * Add_Change_Level Terry Bernie *
1264+// *************************************************************************
1265+HTREEITEM GD_FileView::Add_Change_Level(char* SFileName, int Index)
1266+{
1267+ HWND Temp2 = GetDlgItem(App->ListPanel, IDC_TREE1);
1268+
1269+ tvinsert.hParent = GD_Change_Level_Folder;
1270+ tvinsert.hInsertAfter = TVI_LAST;
1271+ tvinsert.item.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM;
1272+ tvinsert.item.pszText = SFileName;
1273+ tvinsert.item.iImage = 4;
1274+ tvinsert.item.iSelectedImage = 5;
1275+ tvinsert.item.lParam = Index;
1276+ HTREEITEM Temp = (HTREEITEM)SendDlgItemMessage(App->ListPanel, IDC_TREE1, TVM_INSERTITEM, 0, (LPARAM)& tvinsert);
1277+
1278+ if (App->GDCL_Load_Scene->File_Is_Loading == 0)
1279+ {
1280+ TreeView_Select(Temp2, Temp, TVGN_CARET);
1281+ }
1282+
1283+ return Temp;
1284+}
1285+
1286+// *************************************************************************
12391287 // * Add_Collectable Terry Bernie *
12401288 // *************************************************************************
12411289 HTREEITEM GD_FileView::Add_Collectable(char* SFileName, int Index)
--- Equity10/GD_FileView.h (revision 110)
+++ Equity10/GD_FileView.h (revision 111)
@@ -58,6 +58,8 @@
5858 HTREEITEM Add_Teleport(char* SFileName, int Index);
5959 HTREEITEM Add_Room_Object(char* SFileName, int Index);
6060 HTREEITEM Add_Environment(char* SFileName, int Index);
61+ HTREEITEM Add_Area_Change(char* SFileName, int Index);
62+ HTREEITEM Add_Change_Level(char* SFileName, int Index);
6163
6264 void Add_Stock_Message(char* SFileName, int Index); // May Need HTREEITEM
6365 void Add_Stock_Sound(char* SFileName, int Index);
@@ -89,6 +91,8 @@
8991 HTREEITEM GD_Environment_Folder;
9092 HTREEITEM GD_Area_Change_Folder;
9193 HTREEITEM GD_Level_Change_Folder;
94+ HTREEITEM GD_Change_Level_Folder;
95+
9296 HTREEITEM GD__Folder;
9397 HTREEITEM GD_Player;
9498 HTREEITEM GD_Rooms;
--- Equity10/VersionNo2.h (revision 110)
+++ Equity10/VersionNo2.h (revision 111)
@@ -39,21 +39,21 @@
3939 #ifndef _VERSIONNO__H_
4040 #define _VERSIONNO__H_
4141
42-#define VERSION_FULL 1.20.219.51
42+#define VERSION_FULL 1.20.219.56
4343
4444 #define VERSION_BASEYEAR 2019
4545 #define VERSION_DATE "2019-08-08"
46-#define VERSION_TIME "19:20:02"
46+#define VERSION_TIME "20:03:19"
4747
4848 #define VERSION_MAJOR 1
4949 #define VERSION_MINOR 20
5050 #define VERSION_BUILDNO 219
51-#define VERSION_EXTEND 51
51+#define VERSION_EXTEND 56
5252
53-#define VERSION_FILE 1,20,219,51
54-#define VERSION_PRODUCT 1,20,219,58
55-#define VERSION_FILESTR "1,20,219,51\0"
56-#define VERSION_PRODUCTSTR "1,20,219,58\0"
53+#define VERSION_FILE 1,20,219,56
54+#define VERSION_PRODUCT 1,20,219,63
55+#define VERSION_FILESTR "1,20,219,56\0"
56+#define VERSION_PRODUCTSTR "1,20,219,63\0"
5757 #define VERSION_EVERSION "0.3.4.0\0"
5858
5959 #endif
\ No newline at end of file
Show on old repository browser