• R/O
  • SSH
  • HTTPS

vima19: Commit


Commit MetaInfo

Revision1426 (tree)
Time2022-11-25 05:22:25
Authorhgtterry

Log Message

GameDirectorSB 241122 Player Locations

Change Summary

Incremental Difference

--- Anim19_OSDN/SB_Locations.cpp (revision 1425)
+++ Anim19_OSDN/SB_Locations.cpp (revision 1426)
@@ -39,7 +39,7 @@
3939 }
4040
4141 // *************************************************************************
42-// * Start_Projection Terry Bernie *
42+// * Start_Locations:- Terry and Hazel Flanigan 2022 *
4343 // *************************************************************************
4444 void SB_Locations::Start_Locations_Dlg()
4545 {
@@ -49,7 +49,7 @@
4949 Locations_Dlg_hWnd = CreateDialog(App->hInst, (LPCTSTR)IDD_PROJECTION, App->Fdlg, (DLGPROC)Locations_Proc);
5050 }
5151 // *************************************************************************
52-// * Projection_Proc Terry Bernie *
52+// * Location_Proc:- Terry and Hazel Flanigan 2022 *
5353 // *************************************************************************
5454 LRESULT CALLBACK SB_Locations::Locations_Proc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
5555 {
@@ -350,7 +350,7 @@
350350
351351 if (Location_Index > -1)
352352 {
353- App->SBC_Player->Goto_Location(Location_Index);
353+ App->SBC_Locations->Goto_Location(Location_Index);
354354
355355 HWND temp = GetDlgItem(hDlg, IDC_CKMOVECAM);
356356 int test = SendMessage(temp, BM_GETCHECK, 0, 0);
@@ -370,6 +370,7 @@
370370 return TRUE;
371371 }
372372
373+ // --------------------- SAVE LOCATION
373374 if (LOWORD(wParam) == IDC_BTSAVE_LOCATION_PLAYER)
374375 {
375376 strcpy(App->Cl_Dialogs->btext, "Location Name");
@@ -390,7 +391,7 @@
390391 }
391392
392393 strcpy(buf, App->Cl_Dialogs->Chr_Text);
393- App->SBC_Player->Save_Location(buf);
394+ App->SBC_Locations->Save_Location(buf);
394395
395396 SendDlgItemMessage(hDlg, IDC_LSTLOCATIONS, LB_ADDSTRING, (WPARAM)0, (LPARAM)(LPCTSTR)buf);
396397 return TRUE;
@@ -422,3 +423,37 @@
422423 }
423424 return FALSE;
424425 }
426+
427+// *************************************************************************
428+// * Save_Location:- Terry and Hazel Flanigan 2022 *
429+// *************************************************************************
430+void SB_Locations::Save_Location(char* name)
431+{
432+ int Count = App->SBC_Scene->Player_Location_Count;
433+
434+ App->SBC_Scene->B_Locations[Count] = new Base_Locations();
435+
436+ App->SBC_Scene->B_Locations[Count]->Deleted = 0;
437+
438+ App->SBC_Scene->B_Locations[Count]->Location_ID = App->SBC_Scene->Locations_ID_Counter;
439+
440+ strcpy(App->SBC_Scene->B_Locations[Count]->Name, name);
441+ App->SBC_Scene->B_Locations[Count]->Current_Position = App->SBC_Scene->B_Player[0]->Player_Node->getPosition();
442+ App->SBC_Scene->B_Locations[Count]->Physics_Position = App->SBC_Scene->B_Player[0]->Phys_Body->getWorldTransform().getOrigin();
443+ App->SBC_Scene->B_Locations[Count]->Physics_Rotation = App->SBC_Scene->B_Player[0]->Phys_Body->getWorldTransform().getRotation();
444+
445+ App->SBC_Scene->Locations_ID_Counter++;
446+ App->SBC_Scene->Player_Location_Count++;
447+}
448+
449+// *************************************************************************
450+// * Goto_Locatio:- Terry and Hazel Flanigan 2022 *
451+// *************************************************************************
452+void SB_Locations::Goto_Location(int Index)
453+{
454+ App->SBC_Scene->B_Player[0]->Player_Node->setPosition(App->SBC_Scene->B_Locations[Index]->Current_Position);
455+
456+ App->SBC_Scene->B_Player[0]->Phys_Body->getWorldTransform().setOrigin(App->SBC_Scene->B_Locations[Index]->Physics_Position);
457+
458+ App->SBC_Scene->B_Player[0]->Phys_Body->getWorldTransform().setRotation(App->SBC_Scene->B_Locations[Index]->Physics_Rotation);
459+}
--- Anim19_OSDN/SB_Locations.h (revision 1425)
+++ Anim19_OSDN/SB_Locations.h (revision 1426)
@@ -30,11 +30,14 @@
3030 ~SB_Locations(void);
3131
3232 void Start_Locations_Dlg();
33+ void Save_Location(char* name);
3334
3435 protected:
3536
3637 static LRESULT CALLBACK Locations_Proc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
3738
39+ void Goto_Location(int Index);
40+
3841 HWND Locations_Dlg_hWnd;
3942
4043 bool Toggle_Player_Flag;
--- Anim19_OSDN/SB_Player.cpp (revision 1425)
+++ Anim19_OSDN/SB_Player.cpp (revision 1426)
@@ -835,39 +835,4 @@
835835 }
836836
837837 }
838-// *************************************************************************
839-// * Save_Location Terry *
840-// *************************************************************************
841-void SB_Player::Save_Location(char* name)
842-{
843838
844- int Count = App->SBC_Scene->Player_Location_Count;
845-
846- App->SBC_Scene->B_Locations[Count] = new Base_Locations();
847-
848- App->SBC_Scene->B_Locations[Count]->Deleted = 0;
849-
850- App->SBC_Scene->B_Locations[Count]->Location_ID = App->SBC_Scene->Locations_ID_Counter;
851- App->SBC_Scene->Locations_ID_Counter++;
852-
853- strcpy(App->SBC_Scene->B_Locations[Count]->Name, name);
854- App->SBC_Scene->B_Locations[Count]->Current_Position = App->SBC_Scene->B_Player[0]->Player_Node->getPosition();
855- App->SBC_Scene->B_Locations[Count]->Physics_Position = App->SBC_Scene->B_Player[0]->Phys_Body->getWorldTransform().getOrigin();
856- App->SBC_Scene->B_Locations[Count]->Physics_Rotation = App->SBC_Scene->B_Player[0]->Phys_Body->getWorldTransform().getRotation();
857-
858- App->SBC_Scene->Player_Location_Count++;
859-
860-}
861-
862-// *************************************************************************
863-// * Goto_Locatio Terry *
864-// *************************************************************************
865-void SB_Player::Goto_Location(int Index)
866-{
867-
868- App->SBC_Scene->B_Player[0]->Player_Node->setPosition(App->SBC_Scene->B_Locations[Index]->Current_Position);
869-
870- App->SBC_Scene->B_Player[0]->Phys_Body->getWorldTransform().setOrigin(App->SBC_Scene->B_Locations[Index]->Physics_Position);
871-
872- App->SBC_Scene->B_Player[0]->Phys_Body->getWorldTransform().setRotation(App->SBC_Scene->B_Locations[Index]->Physics_Rotation);
873-}
--- Anim19_OSDN/SB_Player.h (revision 1425)
+++ Anim19_OSDN/SB_Player.h (revision 1426)
@@ -42,9 +42,6 @@
4242 void Check_Collisions(void);
4343 void Check_Collisions_New(void);
4444
45- void Save_Location(char* name);
46- void Goto_Location(int Index);
47-
4845 int Col_numManifolds;
4946 int Col_Player_Index;
5047 int Col_Usage_Index;
--- Anim19_OSDN/SB_Project_Create.cpp (revision 1425)
+++ Anim19_OSDN/SB_Project_Create.cpp (revision 1426)
@@ -100,7 +100,7 @@
100100 App->SBC_Display->Add_New_Counter();
101101
102102 // ------------------------ Add Location
103- App->SBC_Player->Save_Location("Start_Position");
103+ App->SBC_Locations->Save_Location("Start_Position");
104104
105105 // ------------------------ Add Area FileView
106106
Show on old repository browser