• R/O
  • SSH
  • HTTPS

vima19: Commit


Commit MetaInfo

Revision751 (tree)
Time2022-08-13 19:42:15
Authorhgtterry

Log Message

Equity_SB 130822 Project (WIP)

Change Summary

Incremental Difference

--- Anim19_OSDN/GD19_OSDN.cpp (revision 750)
+++ Anim19_OSDN/GD19_OSDN.cpp (revision 751)
@@ -281,7 +281,7 @@
281281 // ------------------------------------------------------------
282282 case ID_NEW_PROJECT:
283283 {
284- App->SBC_Project->Start_Save_Project_Dialog(1);
284+ App->SBC_Project->Start_Save_Project_Dialog();
285285 return 1;
286286 }
287287
@@ -293,7 +293,7 @@
293293
294294 case ID_FILE_QUICKLOAD:
295295 {
296- App->SBC_Project->Load_Scene_Auto();
296+// App->SBC_Project->Load_Scene_Auto();
297297 return 1;
298298 }
299299
@@ -305,28 +305,10 @@
305305
306306 case ID_FILE_SAVEPROJECT:
307307 {
308- App->SBC_Project->Start_Save_Project_Dialog(0);
308+ App->SBC_Project->Start_Save_Project_Dialog();
309309 return 1;
310310 }
311311
312- // Exporters
313-
314- //case ID_OGRE3D_TEST:
315- //{
316- // //App->CL_Vm_Exporter->Actor_Model();
317- // App->Say("Here");
318-
319- // char Path[1024];
320- // strcpy(Path, App->EquityDirecory_FullPath);;
321- // strcat(Path, "\\");
322- // strcat(Path, "Data");
323- // strcat(Path, "\\");
324- // strcat(Path, "Test.mesh");
325- // App->Say(Path);
326- // App->CL_Vm_Model->CreateMeshFile("Test.mesh");
327- // return 1;
328- //}
329-
330312 // Camera Mode
331313 case ID_MODE_WORLD:
332314 {
--- Anim19_OSDN/SB_Project.cpp (revision 750)
+++ Anim19_OSDN/SB_Project.cpp (revision 751)
@@ -57,7 +57,6 @@
5757 Write_Object_Ini = NULL;
5858
5959 Project_Loaded = 0;
60- m_Create_Flag = 0;
6160
6261 test = "poo";
6362
@@ -71,10 +70,8 @@
7170 // *************************************************************************
7271 // * Start_Save_Project_Dialog Terry Flanigan *
7372 // *************************************************************************
74-bool SB_Project::Start_Save_Project_Dialog(bool Create)
73+bool SB_Project::Start_Save_Project_Dialog()
7574 {
76- m_Create_Flag = Create;
77-
7875 DialogBox(App->hInst, (LPCTSTR)IDD_PROJECT, App->Fdlg, (DLGPROC)Create_Project_Proc);
7976 return 1;
8077 }
@@ -107,15 +104,10 @@
107104 SetDlgItemText(hDlg, IDC_STLEVELNAME, (LPCTSTR)App->SBC_Project->m_Level_Name);
108105 SetDlgItemText(hDlg, IDC_STPJFOLDERPATH, (LPCTSTR)App->SBC_Project->m_Project_Folder_Path);
109106
110- if (App->SBC_Project->m_Create_Flag == 1)
111- {
112- SetDlgItemText(hDlg, IDC_STBANNER, (LPCTSTR)"Create Project");
113- }
114- else
115- {
116- SetDlgItemText(hDlg, IDC_STBANNER, (LPCTSTR)"Save Project As");
117- }
118107
108+ SetDlgItemText(hDlg, IDC_STBANNER, (LPCTSTR)"Save Project As");
109+
110+
119111
120112 return TRUE;
121113 }
@@ -300,16 +292,8 @@
300292
301293 if (LOWORD(wParam) == IDOK)
302294 {
303-
304- if (App->SBC_Project->m_Create_Flag == 1)
305- {
306- App->SBC_Project->Create_Project();
307- }
308- else
309- {
310- App->SBC_Project->N_Save_Project();
311- }
312-
295+ App->SBC_Project->N_Save_Project();
296+
313297 EndDialog(hDlg, LOWORD(wParam));
314298 return TRUE;
315299 }
@@ -320,170 +304,6 @@
320304 }
321305
322306 // *************************************************************************
323-// * Create_Project Terry Flanigan *
324-// *************************************************************************
325-bool SB_Project::Create_Project()
326-{
327-
328-
329- if (_mkdir(m_Project_Folder_Path) == 0)
330- {
331- _chdir(m_Project_Folder_Path);
332- }
333- else
334- {
335- _chdir(m_Project_Folder_Path);
336- }
337-
338- //Set_Paths();
339- //N_Set_Paths();
340- //Write_Project_Ini();
341- N_Save_Project_Ini();
342-
343- N_Save_Level_Folder();
344-
345- _chdir(m_Level_Folder_Path);
346-
347-
348- N_Save_Aera_Folder();
349-
350- N_Save_Players_Folder();
351-
352- return 1;
353-
354- //Create_Level_Folder();
355-
356- //Write_Level_File();
357-
358- // Player
359- App->SBC_Player->Create_Player_Object();
360- strcpy(App->SBC_Scene->SBC_Base_Player[0]->Player_Name,"Player_1");
361- Write_Player();
362-
363- // Camera
364- Write_Camera();
365-
366- // Objects
367- Write_Objects();
368-
369- Add_World(); // Create First room Not Loaded
370-
371- //strcpy(App->CL_Vm_Model->Model_FolderPath, Level_Folder_Path_World);
372- //strcpy(App->CL_Vm_Model->FileName, "World.mesh");
373-
374- //App->SBC_Aera->Add_Area();
375-
376- App->Cl19_Ogre->OgreListener->GD_CameraMode = Enums::CamDetached;
377-
378-
379- // File View Stuff
380- App->SBC_FileView->Change_Level_Name();
381-
382- App->SBC_Camera->FileViewItem = App->SBC_FileView->Add_Camera(App->SBC_Camera->Camera_Name, 0);
383- App->SBC_Player->FileViewItem = App->SBC_FileView->Add_PlayerFile(App->SBC_Scene->SBC_Base_Player[0]->Player_Name, 0);
384- HTREEITEM Temp = App->SBC_FileView->Add_Area("Area_1", 0);
385- App->SBC_FileView->Redraw_FileView();
386-
387- // Start Level
388- App->SBC_Physics->Enable_Physics(1);
389- App->SBC_Camera->Set_Camera();
390-
391- App->SBC_Scene->Scene_Loaded = 1;
392-
393- App->Say("Scene Created");
394- return 1;
395-}
396-
397-// *************************************************************************
398-// * Set_Paths Terry Flanigan *
399-// *************************************************************************
400-bool SB_Project::Set_Paths()
401-{
402- Project_Ini_FilePath[0] = 0;
403-
404- strcpy(Project_Ini_FilePath, App->SBC_Project->m_Project_Folder_Path);
405- strcat(Project_Ini_FilePath, "\\");
406- strcat(Project_Ini_FilePath, "Project.eif");
407-
408- strcpy(m_Project_Sub_Folder, App->SBC_Project->m_Project_Folder_Path);
409- strcat(m_Project_Sub_Folder, "\\");
410- strcat(m_Project_Sub_Folder, "Level_1");
411- return 1;
412-}
413-
414-// *************************************************************************
415-// * Write_Project_Ini Terry Flanigan *
416-// *************************************************************************
417-bool SB_Project::Write_Project_Ini()
418-{
419-
420- Write_Ini = NULL;
421-
422- Write_Ini = fopen(Project_Ini_FilePath, "wt");
423-
424- if (!Write_Ini)
425- {
426- App->Say("Cant Create File");
427- return 0;
428- }
429-
430- fprintf(Write_Ini, "%s\n", "[Files]");
431- fprintf(Write_Ini, "%s%s\n", "Project_Name=", App->SBC_Project->m_Project_Name);
432- fprintf(Write_Ini, "%s%s\n", "Folder_Path=", App->SBC_Project->m_Project_Folder_Path);
433-
434- fprintf(Write_Ini, "%s\n", "[Player]");
435- fprintf(Write_Ini, "%s%s\n", "Player_File=","Player1.ply");
436-
437- fprintf(Write_Ini, "%s\n", "[Camera]");
438- fprintf(Write_Ini, "%s%s\n", "Camera_File=", "Cam1.cam");
439-
440- fprintf(Write_Ini, "%s\n", "[Objects]");
441- fprintf(Write_Ini, "%s%s\n", "Camera_File=", "Objects.obf");
442-
443- fclose(Write_Ini);
444-
445- return 1;
446-}
447-
448-// *************************************************************************
449-// * Create_Level_Folder Terry Flanigan *
450-// *************************************************************************
451-bool SB_Project::Create_Level_Folder()
452-{
453- Level_Folder_Path_World[0] = 0;
454-
455- strcpy(Level_Folder_Path_World, m_Project_Sub_Folder);
456- strcat(Level_Folder_Path_World, "\\");
457- strcat(Level_Folder_Path_World, "World1");
458-
459- // First Level Folder
460- if (_mkdir(m_Project_Sub_Folder) == 0)
461- {
462- _chdir(m_Project_Sub_Folder);
463-
464- }
465- else
466- {
467- //App->Say("Directory already exsits");
468-
469- }
470-
471- // First world Folder
472- if (_mkdir(Level_Folder_Path_World) == 0)
473- {
474- _chdir(m_Project_Sub_Folder);
475-
476- }
477- else
478- {
479- //App->Say("Directory already exsits");
480-
481- }
482-
483- return 1;
484-}
485-
486-// *************************************************************************
487307 // * Write_Objects Terry Flanigan *
488308 // *************************************************************************
489309 bool SB_Project::Write_Objects()
@@ -673,158 +493,6 @@
673493 }
674494
675495 // *************************************************************************
676-// * Add_World Terry Flanigan *
677-// *************************************************************************
678-bool SB_Project::Add_World()
679-{
680- char Source[1024];
681- char Destination[1024];
682-
683- strcpy(Source, App->EquityDirecory_FullPath);
684- strcat(Source, "\\Data\\World_Ogre\\World.mesh");
685-
686- strcpy(Destination, Level_Folder_Path_World);
687- strcat(Destination, "\\");
688- strcat(Destination, "World.mesh");
689-
690- CopyFile(Source, Destination, true);
691-
692- // --------------------------------------------------------------------
693- strcpy(Source, App->EquityDirecory_FullPath);
694- strcat(Source, "\\Data\\World_Ogre\\World.material");
695-
696- strcpy(Destination, Level_Folder_Path_World);
697- strcat(Destination, "\\");
698- strcat(Destination, "World.material");
699-
700- CopyFile(Source, Destination, true);
701-
702- // --------------------------------------------------------------------
703- strcpy(Source, App->EquityDirecory_FullPath);
704- strcat(Source, "\\Data\\World_Ogre\\Wall.bmp");
705-
706- strcpy(Destination, Level_Folder_Path_World);
707- strcat(Destination, "\\");
708- strcat(Destination, "Wall.bmp");
709-
710- CopyFile(Source, Destination, true);
711-
712- // --------------------------------------------------------------------
713- strcpy(Source, App->EquityDirecory_FullPath);
714- strcat(Source, "\\Data\\World_Ogre\\stfloor1.bmp");
715-
716- strcpy(Destination, Level_Folder_Path_World);
717- strcat(Destination, "\\");
718- strcat(Destination, "stfloor1.bmp");
719-
720- CopyFile(Source, Destination, true);
721-
722- // --------------------------------------------------------------------
723- strcpy(Source, App->EquityDirecory_FullPath);
724- strcat(Source, "\\Data\\World_Ogre\\concrete.bmp");
725-
726- strcpy(Destination, Level_Folder_Path_World);
727- strcat(Destination, "\\");
728- strcat(Destination, "concrete.bmp");
729-
730- CopyFile(Source, Destination, true);
731-
732- return 1;
733-}
734-
735-// *************************************************************************
736-// * Load_Scene_Auto Terry Bernie *
737-// *************************************************************************
738-bool SB_Project::Load_Scene_Auto()
739-{
740- int ObjectsCount = 0;
741- int TagFloat = 0;
742- int TagInt = 0;
743-
744- char StartFile[1024];
745- strcpy(StartFile, App->EquityDirecory_FullPath);
746- strcat(StartFile, "\\");
747- strcat(StartFile, "Data\\StartUp.gcf");
748-
749- App->Cl_Ini->SetPathName(StartFile);
750-
751- App->Cl_Ini->GetString("Startup", "Scene_FileName", App->CL_Vm_FileIO->Model_FileName, 1024);
752- App->Cl_Ini->GetString("Startup", "Scene_Path_FileName", App->CL_Vm_FileIO->Model_Path_FileName,1024);
753-
754- Load_Scene();
755-
756- return 1;
757-}
758-
759-// *************************************************************************
760-// * Load_Scene Terry Flanigan *
761-// *************************************************************************
762-bool SB_Project::Load_Scene()
763-{
764-
765- return 1;
766-
767- //App->SBC_Scene->Clear_Level();
768-
769- //strcpy(Level_File_Name, App->CL_Vm_FileIO->Model_FileName);
770- //strcpy(m_Project_Folder_Path, App->CL_Vm_FileIO->Model_Path_FileName);
771-
772- //// Get path no file
773- //int len1 = strlen(Level_File_Name);
774- //int len2 = strlen(m_Project_Folder_Path);
775- //strcpy(m_Project_Sub_Folder, m_Project_Folder_Path);
776- //m_Project_Sub_Folder[len2 - len1] = 0;
777-
778- //// -------------------------------------------------------------------
779-
780- //char chr_Tag1[1024];
781- //char chr_Tag2[1024];
782-
783- //chr_Tag1[0] = 0;
784- //chr_Tag2[0] = 0;
785-
786- //App->Cl_Ini->SetPathName(m_Project_Folder_Path);
787-
788- //App->Cl_Ini->GetString("Version_Data", "Version", chr_Tag1, 1024);
789- //
790-
791- //App->Cl_Ini->GetString("Levels", "Folder", chr_Tag1, 1024);
792- ////strcpy(Scene_JustPath, Level_Folder_Path);
793- ////strcat(Scene_JustPath, chr_Tag1);
794-
795- //App->Cl_Ini->GetString("Levels", "File", chr_Tag2, 1024);
796-
797- ////strcpy(App->CL_Vm_Model->Model_FolderPath, Scene_JustPath);
798- //strcpy(App->CL_Vm_Model->FileName, chr_Tag2);
799-
800- //Read_Player();
801- //Read_Camera();
802-
803- //App->SBC_Aera->Add_Area();
804-
805- ////App->SBC_Player->Load_Player();
806-
807- //App->Cl19_Ogre->OgreListener->GD_CameraMode = Enums::CamDetached;
808-
809-
810- //// File View Stuff
811- //App->SBC_FileView->Change_Level_Name();
812-
813- //HTREEITEM Temp = App->SBC_FileView->Add_Area("Area_1", 0);
814- //App->SBC_FileView->Redraw_FileView();
815-
816- //// Start Level
817- //App->SBC_Physics->Enable_Physics(1);
818- //App->SBC_Camera->Set_Camera();
819-
820- //App->SBC_Scene->Scene_Loaded = 1;
821-
822- //App->Set_Main_TitleBar(App->CL_Vm_FileIO->Model_Path_FileName);
823-
824- return 1;
825-}
826-
827-// *************************************************************************
828496 // * Read_Player Terry Flanigan *
829497 // *************************************************************************
830498 bool SB_Project::Read_Player()
--- Anim19_OSDN/SB_Project.h (revision 750)
+++ Anim19_OSDN/SB_Project.h (revision 751)
@@ -39,7 +39,7 @@
3939 SB_Project();
4040 ~SB_Project();
4141
42- bool Start_Save_Project_Dialog(bool Create);
42+ bool Start_Save_Project_Dialog();
4343
4444 bool N_Save_Project();
4545 bool N_Save_Project_Ini();
@@ -72,9 +72,6 @@
7272
7373 //------------------------------------------------
7474
75- bool Load_Scene_Auto();
76- bool Load_Scene();
77-
7875 bool Write_Level_File();
7976 bool Write_Player();
8077 bool Write_Camera();
@@ -95,20 +92,11 @@
9592
9693 static LRESULT CALLBACK Create_Project_Proc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
9794
98- bool Create_Project();
99-
100- bool Set_Paths();
101- bool Write_Project_Ini();
102- bool Create_Level_Folder();
103- bool Add_World();
104-
10595 void N_Set_Paths();
10696
10797 bool Read_Player();
10898 bool Read_Camera();
10999
110- bool m_Create_Flag;
111-
112100 FILE *Write_Ini;
113101 FILE *Write_Player_Ini;
114102 FILE *Write_Object_Ini;
--- Anim19_OSDN/SB_TopTabs.cpp (revision 750)
+++ Anim19_OSDN/SB_TopTabs.cpp (revision 751)
@@ -1037,7 +1037,7 @@
10371037 if (LOWORD(wParam) == IDC_TBBTQLOAD)
10381038 {
10391039
1040- App->SBC_Project->Load_Scene_Auto();
1040+ //App->SBC_Project->Load_Scene_Auto();
10411041 return TRUE;
10421042 }
10431043
Show on old repository browser