• R/O
  • SSH
  • HTTPS

vima19: Commit


Commit MetaInfo

Revision754 (tree)
Time2022-08-13 22:06:06
Authorhgtterry

Log Message

Equity_SB 130822 Scene (WIP)

Change Summary

Incremental Difference

--- Anim19_OSDN/GD19_OSDN.cpp (revision 753)
+++ Anim19_OSDN/GD19_OSDN.cpp (revision 754)
@@ -232,6 +232,7 @@
232232 return 1;
233233 }
234234
235+ // ----------------------------------- Debug App
235236 case ID_APP_PROJECT:
236237 {
237238 App->SBC_Dialogs->What_List = Enums::Show_List_Project;
@@ -239,6 +240,15 @@
239240 return 1;
240241 }
241242
243+ case ID_APP_SCENE:
244+ {
245+ App->SBC_Dialogs->What_List = Enums::Show_List_Scene;
246+ App->SBC_Dialogs->Show_List_Data();
247+ return 1;
248+ }
249+
250+
251+
242252 case ID_TEST_PROGRESSBAR:
243253 {
244254 if (App->CL_Vm_ImGui->Show_Progress_Bar == 0)
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
--- Anim19_OSDN/SB_Aera.cpp (revision 753)
+++ Anim19_OSDN/SB_Aera.cpp (revision 754)
@@ -372,6 +372,9 @@
372372 create_Area_Trimesh_New(Index,Area);
373373
374374 Area->Usage = Enums::Usage_Room;
375+
376+ App->SBC_Scene->Area_Count++;
377+ App->SBC_Scene->Area_Added = 1;
375378 }
376379
377380 // *************************************************************************
--- Anim19_OSDN/SB_Dialogs.cpp (revision 753)
+++ Anim19_OSDN/SB_Dialogs.cpp (revision 754)
@@ -170,18 +170,12 @@
170170 return TRUE;
171171 }
172172
173- if (App->SBC_Dialogs->What_List == Enums::Show_List_Model)
173+ if (App->SBC_Dialogs->What_List == Enums::Show_List_Scene)
174174 {
175- //App->SBC_Dialogs->List_ModelData(hDlg);
175+ App->SBC_Dialogs->List_App_Scene(hDlg);
176176 return TRUE;
177177 }
178178
179- if (App->SBC_Dialogs->What_List == Enums::Show_List_App)
180- {
181- //App->SBC_Dialogs->List_App_Data(hDlg);
182- return TRUE;
183- }
184-
185179 return TRUE;
186180 }
187181 case WM_CTLCOLORSTATIC:
@@ -232,10 +226,44 @@
232226 sprintf(buf, "%s", App->SBC_Project->m_Project_Folder_Path);
233227 SendDlgItemMessage(hDlg, IDC_LISTGROUP, LB_ADDSTRING, (WPARAM)0, (LPARAM)buf);
234228
235- //sprintf(buf, "%s %s", "Full Path", App->SBC_Project->m_Project_Full_Path);
236- //SendDlgItemMessage(hDlg, IDC_LISTGROUP, LB_ADDSTRING, (WPARAM)0, (LPARAM)buf);
229+}
237230
238- //sprintf(buf, "%s %s", "Project Sub Folder", App->SBC_Project->m_Project_Sub_Folder);
239- //SendDlgItemMessage(hDlg, IDC_LISTGROUP, LB_ADDSTRING, (WPARAM)0, (LPARAM)buf);
231+// *************************************************************************
232+// * List_App_Scene Terry Flanigan *
233+// *************************************************************************
234+void SB_Dialogs::List_App_Scene(HWND hDlg)
235+{
240236
237+ char buf[255];
238+
239+ sprintf(buf, "%s %i", "Scene Loaded = ", App->SBC_Scene->Scene_Loaded);
240+ SendDlgItemMessage(hDlg, IDC_LISTGROUP, LB_ADDSTRING, (WPARAM)0, (LPARAM)buf);
241+
242+ SendDlgItemMessage(hDlg, IDC_LISTGROUP, LB_ADDSTRING, (WPARAM)0, (LPARAM)" ");
243+
244+ sprintf(buf, "%s %i", "Player Added = ", App->SBC_Scene->Player_Added);
245+ SendDlgItemMessage(hDlg, IDC_LISTGROUP, LB_ADDSTRING, (WPARAM)0, (LPARAM)buf);
246+ sprintf(buf, "%s %i","Count = ", App->SBC_Scene->Player_Count);
247+ SendDlgItemMessage(hDlg, IDC_LISTGROUP, LB_ADDSTRING, (WPARAM)0, (LPARAM)buf);
248+
249+ SendDlgItemMessage(hDlg, IDC_LISTGROUP, LB_ADDSTRING, (WPARAM)0, (LPARAM)" ");
250+
251+ sprintf(buf, "%s %i", "Aera Added = ", App->SBC_Scene->Area_Added);
252+ SendDlgItemMessage(hDlg, IDC_LISTGROUP, LB_ADDSTRING, (WPARAM)0, (LPARAM)buf);
253+ sprintf(buf, "%s %i", "Count = ",App->SBC_Scene->Area_Count);
254+ SendDlgItemMessage(hDlg, IDC_LISTGROUP, LB_ADDSTRING, (WPARAM)0, (LPARAM)buf);
255+
256+ SendDlgItemMessage(hDlg, IDC_LISTGROUP, LB_ADDSTRING, (WPARAM)0, (LPARAM)" ");
257+
258+ sprintf(buf, "%s %i", "Camera Added = ", App->SBC_Scene->Camera_Added);
259+ SendDlgItemMessage(hDlg, IDC_LISTGROUP, LB_ADDSTRING, (WPARAM)0, (LPARAM)buf);
260+ sprintf(buf, "%s %i", "Count = ", App->SBC_Scene->Camera_Count);
261+ SendDlgItemMessage(hDlg, IDC_LISTGROUP, LB_ADDSTRING, (WPARAM)0, (LPARAM)buf);
262+
263+ SendDlgItemMessage(hDlg, IDC_LISTGROUP, LB_ADDSTRING, (WPARAM)0, (LPARAM)" ");
264+
265+ sprintf(buf, "%s %i", "Objects Added = ", App->SBC_Scene->Objects_Added);
266+ SendDlgItemMessage(hDlg, IDC_LISTGROUP, LB_ADDSTRING, (WPARAM)0, (LPARAM)buf);
267+ sprintf(buf, "%s %i", "Count = ", App->SBC_Scene->Object_Count);
268+ SendDlgItemMessage(hDlg, IDC_LISTGROUP, LB_ADDSTRING, (WPARAM)0, (LPARAM)buf);
241269 }
--- Anim19_OSDN/SB_Dialogs.h (revision 753)
+++ Anim19_OSDN/SB_Dialogs.h (revision 754)
@@ -44,5 +44,6 @@
4444 static LRESULT CALLBACK GroupData_Proc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
4545
4646 void List_App_Project(HWND hDlg);
47+ void List_App_Scene(HWND hDlg);
4748 };
4849
--- Anim19_OSDN/SB_Import_Room.cpp (revision 753)
+++ Anim19_OSDN/SB_Import_Room.cpp (revision 754)
@@ -40,8 +40,6 @@
4040
4141 App->Cl_Grid->Grid_SetVisible(1);
4242
43- App->SBC_Scene->Area_Count++;
44-
4543 App->Cl19_Ogre->OgreListener->GD_CameraMode = Enums::CamDetached;
4644
4745 App->SBC_Player->Create_Player_Object();
--- Anim19_OSDN/SB_Player.cpp (revision 753)
+++ Anim19_OSDN/SB_Player.cpp (revision 754)
@@ -275,7 +275,7 @@
275275 if (App->SBC_Scene->Scene_Loaded == 1)
276276 {
277277 //App->SBC_Project->Write_Player();
278- App->Say("Player Saved");
278+ //App->Say("Player Saved");
279279 }
280280 return 1;
281281 }
@@ -311,14 +311,14 @@
311311 if (LOWORD(wParam) == IDC_BTLOOKAT)
312312 {
313313
314- App->Cl19_Ogre->OgreListener->GD_CameraMode = Enums::CamDetached;
314+ //App->Cl19_Ogre->OgreListener->GD_CameraMode = Enums::CamDetached;
315315
316- //RedrawWindow(App->Cl_ToolBar->TB_1, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW);
316+ // //RedrawWindow(App->Cl_ToolBar->TB_1, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW);
317317
318- int Index = App->SBC_Properties->Current_Selected_Object;
319- Ogre::Vector3 Centre = App->Cl_Scene_Data->Cl_Object[Index]->OgreNode->getAttachedObject(0)->getBoundingBox().getCenter();
320- Ogre::Vector3 WS = App->Cl_Scene_Data->Cl_Object[Index]->OgreNode->convertLocalToWorldPosition(Centre);
321- App->Cl19_Ogre->mCamera->setPosition(WS);
318+ //int Index = App->SBC_Properties->Current_Selected_Object;
319+ //Ogre::Vector3 Centre = App->Cl_Scene_Data->Cl_Object[Index]->OgreNode->getAttachedObject(0)->getBoundingBox().getCenter();
320+ //Ogre::Vector3 WS = App->Cl_Scene_Data->Cl_Object[Index]->OgreNode->convertLocalToWorldPosition(Centre);
321+ //App->Cl19_Ogre->mCamera->setPosition(WS);
322322
323323 return 1;
324324 }
--- Anim19_OSDN/SB_Project.cpp (revision 753)
+++ Anim19_OSDN/SB_Project.cpp (revision 754)
@@ -650,8 +650,6 @@
650650 if (Options->Has_Aera > 0)
651651 {
652652 Load_Project_Aera();
653- App->SBC_Scene->Area_Count++;
654- App->SBC_Scene->Area_Added = 1;
655653 }
656654
657655 // ------------------------------------- Player
@@ -663,7 +661,7 @@
663661 // ------------------------------------- Camera
664662 if (Options->Has_Camera > 0)
665663 {
666-
664+ App->SBC_Scene->Camera_Added = 1;
667665 }
668666
669667 // ------------------------------------- Objects
@@ -769,51 +767,51 @@
769767 return 1;
770768 }
771769
772-// *************************************************************************
773-// * N_Load_Project_Camera Terry Flanigan *
774-// *************************************************************************
775-bool SB_Project::Load_Project_Camera()
776-{
777- char chr_Tag1[1024];
778- char chr_Tag2[1024];
779-
780- float x = 0;
781- float y = 0;
782- float z = 0;
783-
784- chr_Tag1[0] = 0;
785- chr_Tag2[0] = 0;
786-
787- // -------------------------------------------------------------------
788- char Path[1024];
789- strcpy(Path, m_Project_Sub_Folder);
790- strcat(Path, "Camera1.cam");
791-
792- // -------------------------------------------------------------------
793-
794- //App->Cl_Ini->SetPathName(Path);
795-
796- //App->Cl_Ini->GetString("Version_Data", "Version", chr_Tag1, 1024);
797-
798- //App->Cl_Ini->GetString("Camera", "Camera_Name", chr_Tag1, 1024);
799- //strcpy(App->SBC_Camera->Camera_Name, chr_Tag1);
800-
801- //// Position
802- //App->Cl_Ini->GetString("Camera", "Start_Position", chr_Tag1, 1024);
803- //sscanf(chr_Tag1, "%f,%f,%f", &x, &y, &z);
804- //App->SBC_Camera->CamPos_X = x;
805- //App->SBC_Camera->CamPos_Y = y;
806- //App->SBC_Camera->CamPos_Z = z;
807-
808- //// Position
809- //App->Cl_Ini->GetString("Camera", "Look_At", chr_Tag1, 1024);
810- //sscanf(chr_Tag1, "%f,%f,%f", &x, &y, &z);
811- //App->SBC_Camera->LookAt_X = x;
812- //App->SBC_Camera->LookAt_Y = y;
813- //App->SBC_Camera->LookAt_Z = z;
814-
815- App->SBC_Camera->FileViewItem = App->SBC_FileView->Add_Camera(App->SBC_Camera->Camera_Name, 0);
816- App->SBC_FileView->Redraw_FileView();
817- return 1;
770+// *************************************************************************
771+// * N_Load_Project_Camera Terry Flanigan *
772+// *************************************************************************
773+bool SB_Project::Load_Project_Camera()
774+{
775+ char chr_Tag1[1024];
776+ char chr_Tag2[1024];
777+
778+ float x = 0;
779+ float y = 0;
780+ float z = 0;
781+
782+ chr_Tag1[0] = 0;
783+ chr_Tag2[0] = 0;
784+
785+ // -------------------------------------------------------------------
786+ char Path[1024];
787+ strcpy(Path, m_Project_Sub_Folder);
788+ strcat(Path, "Camera1.cam");
789+
790+ // -------------------------------------------------------------------
791+
792+ //App->Cl_Ini->SetPathName(Path);
793+
794+ //App->Cl_Ini->GetString("Version_Data", "Version", chr_Tag1, 1024);
795+
796+ //App->Cl_Ini->GetString("Camera", "Camera_Name", chr_Tag1, 1024);
797+ //strcpy(App->SBC_Camera->Camera_Name, chr_Tag1);
798+
799+ //// Position
800+ //App->Cl_Ini->GetString("Camera", "Start_Position", chr_Tag1, 1024);
801+ //sscanf(chr_Tag1, "%f,%f,%f", &x, &y, &z);
802+ //App->SBC_Camera->CamPos_X = x;
803+ //App->SBC_Camera->CamPos_Y = y;
804+ //App->SBC_Camera->CamPos_Z = z;
805+
806+ //// Position
807+ //App->Cl_Ini->GetString("Camera", "Look_At", chr_Tag1, 1024);
808+ //sscanf(chr_Tag1, "%f,%f,%f", &x, &y, &z);
809+ //App->SBC_Camera->LookAt_X = x;
810+ //App->SBC_Camera->LookAt_Y = y;
811+ //App->SBC_Camera->LookAt_Z = z;
812+
813+ App->SBC_Camera->FileViewItem = App->SBC_FileView->Add_Camera(App->SBC_Camera->Camera_Name, 0);
814+ App->SBC_FileView->Redraw_FileView();
815+ return 1;
818816 }
819817
--- Anim19_OSDN/SB_Scene.cpp (revision 753)
+++ Anim19_OSDN/SB_Scene.cpp (revision 754)
@@ -28,6 +28,11 @@
2828
2929 SB_Scene::SB_Scene()
3030 {
31+ Scene_Loaded = 0;
32+ Player_Added = 0;
33+ Area_Added = 0;
34+ Camera_Added = 0;
35+
3136 Player_Count = 0;
3237 Area_Count = 0;
3338 Object_Count = 0;
@@ -36,19 +41,31 @@
3641 SBC_Base_Player[100] = { nullptr };
3742 SBC_Base_Area[100] = { nullptr };
3843 SBC_Base_Area[0] = nullptr;
39-
40- Scene_Loaded = 0;
41- Player_Added = 0;
42- Area_Added = 0;
43-
4444 }
4545
4646
4747 SB_Scene::~SB_Scene()
4848 {
49+
4950 }
5051
5152 // *************************************************************************
53+// * Reset_Class Terry Flanigan *
54+// *************************************************************************
55+void SB_Scene::Reset_Class()
56+{
57+ Scene_Loaded = 0;
58+ Area_Added = 0;
59+ Player_Added = 0;
60+ Camera_Added = 0;
61+
62+ Player_Count = 0;
63+ Area_Count = 0;
64+ Camera_Count = 0;
65+ Object_Count = 0;
66+}
67+
68+// *************************************************************************
5269 // * Clear_Level Terry Flanigan *
5370 // *************************************************************************
5471 bool SB_Scene::Clear_Level()
@@ -82,13 +99,8 @@
8299
83100 App->Cl_Scene_Data->ObjectCount = 0;
84101
85- Player_Count = 0;
86- Area_Count = 0;
87-
88- Scene_Loaded = 0;
89- Area_Added = 0;
90- Player_Added = 0;
91-
102+ Reset_Class(); // This One
103+
92104 App->Cl19_Ogre->OgreListener->GD_CameraMode = Enums::CamNone;
93105
94106 App->SBC_Camera->Reset_View();
--- Anim19_OSDN/SB_Scene.h (revision 753)
+++ Anim19_OSDN/SB_Scene.h (revision 754)
@@ -37,13 +37,20 @@
3737 Base_Player* SBC_Base_Player[100];
3838 Base_Area* SBC_Base_Area[100];
3939
40+ bool Scene_Loaded; // Is the Scene Loaded [131221]
41+
4042 int Player_Count; // Actual Player Count Zero Based
4143 int Area_Count; // Actual Area Count Zero Based [161221]
4244 int Object_Count; // Actual Object Count Zero Based [171221]
4345 int Camera_Count; // Actual Object Count Zero Based [171221]
4446
45- bool Scene_Loaded; // Is the Scene Loaded [131221]
4647 bool Player_Added; // Is there a vaild player in the level [081221]
4748 bool Area_Added; // Is there a vaild Area or Room [131221]
49+ bool Camera_Added; // Is there a vaild Area or Room [131221]
50+ bool Objects_Added;
51+
52+protected:
53+
54+ void Reset_Class();
4855 };
4956
--- Anim19_OSDN/stdafx.h (revision 753)
+++ Anim19_OSDN/stdafx.h (revision 754)
@@ -314,7 +314,8 @@
314314 Show_List_None = 0,
315315 Show_List_Project = 1,
316316 Show_List_Model = 2,
317- Show_List_App = 3
317+ Show_List_App = 3,
318+ Show_List_Scene = 4
318319 };
319320 }
320321
Show on old repository browser