• R/O
  • SSH
  • HTTPS

vima19: Commit


Commit MetaInfo

Revision1844 (tree)
Zeit2023-01-26 00:59:59
Autorhgtterry

Log Message

GameDirectorSB 25-01-23 Light Entity

Ändern Zusammenfassung

Diff

--- Anim19_OSDN/GD19_App.cpp (revision 1843)
+++ Anim19_OSDN/GD19_App.cpp (revision 1844)
@@ -190,7 +190,7 @@
190190 CursorPosX = 500;
191191 CursorPosY = 500;
192192
193- Debug_App = 0;
193+ Debug_App = 1;
194194
195195 EquityDirecory_FullPath[0] = 0;
196196 ETemp_Folder[0] = 0;
--- Anim19_OSDN/SB_Com_Lights.cpp (revision 1843)
+++ Anim19_OSDN/SB_Com_Lights.cpp (revision 1844)
@@ -109,9 +109,9 @@
109109 Object->S_Light[0]->light = App->SBC_Ogre->mSceneMgr->createLight(buf);
110110
111111 Object->S_Light[0]->light->setType(Light::LT_SPOTLIGHT);
112- Object->S_Light[0]->light->setDiffuseColour(0, 0, 1.0);
112+ Object->S_Light[0]->light->setDiffuseColour(ColourValue::White);
113113 Object->S_Light[0]->light->setSpecularColour(ColourValue::White);
114- Object->S_Light[0]->light->setSpotlightRange(Degree(35), Degree(50));
114+ Object->S_Light[0]->light->setSpotlightRange(Degree(5), Degree(10));
115115
116116 Ogre::SceneNode* PartNode = App->SBC_Ogre->mSceneMgr->getRootSceneNode()->createChildSceneNode();
117117
@@ -128,7 +128,7 @@
128128
129129 Object->Object_Node->setScale(Object->Mesh_Scale);
130130 Object->Object_Node->setOrientation(Object->Mesh_Quat);
131-
131+ Object->Object_Node->setScale(0.02, 0.02, 0.02);
132132 }
133133
134134
--- Anim19_OSDN/SB_FileView.cpp (revision 1843)
+++ Anim19_OSDN/SB_FileView.cpp (revision 1844)
@@ -950,11 +950,11 @@
950950 {
951951 App->SBC_FileView->Context_Selection = Enums::FileView_Light_File;
952952
953- //HideRightPanes();
954- //ShowWindow(App->GD_Properties_Hwnd, 1);
953+ HideRightPanes();
954+ ShowWindow(App->GD_Properties_Hwnd, 1);
955955
956956 //App->SBC_Props_Dialog->Hide_Details_Goto_Dlg(1);
957- //App->SBC_Props_Dialog->Hide_Dimensions_Dlg(1, App->SBC_Scene->B_Object[Index]->Dimensions_Locked);
957+ App->SBC_Props_Dialog->Hide_Dimensions_Dlg(1, App->SBC_Scene->B_Object[Index]->Dimensions_Locked);
958958
959959 App->SBC_Properties->Edit_Category = Enums::Edit_Lights;
960960
@@ -966,7 +966,7 @@
966966
967967 App->SBC_Visuals->MarkerBB_Addjust(Index);
968968
969- //App->SBC_Properties->Update_ListView_Particles();
969+ App->SBC_Properties->Update_ListView_Lights();
970970
971971 return;
972972 }
--- Anim19_OSDN/SB_Properties.cpp (revision 1843)
+++ Anim19_OSDN/SB_Properties.cpp (revision 1844)
@@ -364,6 +364,16 @@
364364 return;
365365 }
366366
367+ // Lights
368+ if (Edit_Category == Enums::Edit_Lights)
369+ {
370+ if (Edit_Physics == 0)
371+ {
372+ Edit_Light_Onclick(lParam);
373+ }
374+ return;
375+ }
376+
367377 return;
368378 }
369379
@@ -1224,6 +1234,64 @@
12241234 }
12251235
12261236 // *************************************************************************
1237+// * Update_ListView_Lights:- Terry and Hazel Flanigan 2023 *
1238+// *************************************************************************
1239+bool SB_Properties::Update_ListView_Lights()
1240+{
1241+
1242+ int index = App->SBC_Properties->Current_Selected_Object;
1243+
1244+ char Num[10];
1245+ char chr_ID[50];
1246+ char IndexNum[10];
1247+ _itoa(App->SBC_Scene->B_Object[index]->This_Object_UniqueID, Num, 10);
1248+ _itoa(index, IndexNum, 10);
1249+ strcpy(chr_ID, "Unique ID ");
1250+ strcat(chr_ID, Num);
1251+ strcat(chr_ID, " Object Index ");
1252+ strcat(chr_ID, IndexNum);
1253+ SetWindowText(Properties_Dlg_hWnd, chr_ID);
1254+ SetDlgItemText(Properties_Dlg_hWnd, IDC_STOBJECTNAME, (LPCTSTR)App->SBC_Scene->B_Object[index]->Mesh_Name);
1255+
1256+ char chr_PosX[100];
1257+ sprintf(chr_PosX, "%.3f", App->SBC_Scene->B_Object[index]->Mesh_Pos.x);
1258+ char chr_PosY[100];
1259+ sprintf(chr_PosY, "%.3f", App->SBC_Scene->B_Object[index]->Mesh_Pos.y);
1260+
1261+ const int NUM_ITEMS = 5;
1262+ const int NUM_COLS = 2;
1263+ string grid[NUM_COLS][NUM_ITEMS]; // string table
1264+ LV_ITEM pitem;
1265+ memset(&pitem, 0, sizeof(LV_ITEM));
1266+ pitem.mask = LVIF_TEXT;
1267+
1268+ grid[0][0] = "Name", grid[1][0] = App->SBC_Scene->B_Object[index]->Mesh_Name;
1269+ grid[0][1] = "Particle", grid[1][1] = App->SBC_Scene->B_Object[index]->Mesh_Name;
1270+ grid[0][2] = " ", grid[1][2] = " ";
1271+ grid[0][3] = "PosX", grid[1][3] = chr_PosX;
1272+ grid[0][4] = "PosY", grid[1][4] = chr_PosY;
1273+
1274+ ListView_DeleteAllItems(Properties_hLV);
1275+
1276+ for (DWORD row = 0; row < NUM_ITEMS; row++)
1277+ {
1278+ pitem.iItem = row;
1279+ pitem.pszText = const_cast<char*>(grid[0][row].c_str());
1280+ ListView_InsertItem(Properties_hLV, &pitem);
1281+
1282+ //ListView_SetItemText
1283+
1284+ for (DWORD col = 1; col < NUM_COLS; col++)
1285+ {
1286+ ListView_SetItemText(Properties_hLV, row, col,
1287+ const_cast<char*>(grid[col][row].c_str()));
1288+ }
1289+ }
1290+
1291+ return 1;
1292+}
1293+
1294+// *************************************************************************
12271295 // * Update_ListView_Particles:- Terry and Hazel Flanigan 2022 *
12281296 // *************************************************************************
12291297 bool SB_Properties::Update_ListView_Particles()
@@ -1307,6 +1375,69 @@
13071375 }
13081376
13091377 // *************************************************************************
1378+// * Edit_Light_Onclick:- Terry and Hazel Flanigan 2022 *
1379+// *************************************************************************
1380+void SB_Properties::Edit_Light_Onclick(LPARAM lParam)
1381+{
1382+ int Index = App->SBC_Properties->Current_Selected_Object;
1383+ int result = 1;
1384+ int test;
1385+
1386+ LPNMLISTVIEW poo = (LPNMLISTVIEW)lParam;
1387+ test = poo->iItem;
1388+ ListView_GetItemText(Properties_hLV, test, 0, btext, 20);
1389+
1390+ result = strcmp(btext, "Name");
1391+ if (result == 0)
1392+ {
1393+ App->SBC_Object->Rename_Object(Index);
1394+ Update_ListView_Particles();
1395+ }
1396+
1397+ result = strcmp(btext, "PosX");
1398+ if (result == 0)
1399+ {
1400+
1401+ App->SBC_Gui_Dialogs->Start_Dialog_Float(1, App->SBC_Scene->B_Object[Index]->Mesh_Pos.x, "Pos X");
1402+
1403+ while (App->SBC_Gui_Dialogs->Show_Dialog_Float == 1)
1404+ {
1405+ App->SBC_Gui_Dialogs->BackGround_Render_Loop();
1406+
1407+ App->SBC_Scene->B_Object[Index]->Mesh_Pos.x = App->SBC_Gui_Dialogs->m_Dialog_Float;
1408+ App->SBC_Scene->B_Object[Index]->Object_Node->setPosition(App->SBC_Scene->B_Object[Index]->Mesh_Pos);
1409+
1410+ }
1411+
1412+ App->Disable_Panels(false);
1413+
1414+ Update_ListView_Lights();
1415+ }
1416+
1417+ result = strcmp(btext, "PosY");
1418+ if (result == 0)
1419+ {
1420+
1421+ App->SBC_Gui_Dialogs->Start_Dialog_Float(1, App->SBC_Scene->B_Object[Index]->Mesh_Pos.y, "Pos Y");
1422+
1423+ while (App->SBC_Gui_Dialogs->Show_Dialog_Float == 1)
1424+ {
1425+ App->SBC_Gui_Dialogs->BackGround_Render_Loop();
1426+
1427+ App->SBC_Scene->B_Object[Index]->Mesh_Pos.y = App->SBC_Gui_Dialogs->m_Dialog_Float;
1428+ App->SBC_Scene->B_Object[Index]->Object_Node->setPosition(App->SBC_Scene->B_Object[Index]->Mesh_Pos);
1429+
1430+ }
1431+
1432+ App->Disable_Panels(false);
1433+
1434+ Update_ListView_Lights();
1435+ }
1436+
1437+
1438+}
1439+
1440+// *************************************************************************
13101441 // * Edit_Particle_Onclick:- Terry and Hazel Flanigan 2022 *
13111442 // *************************************************************************
13121443 void SB_Properties::Edit_Particle_Onclick(LPARAM lParam)
--- Anim19_OSDN/SB_Properties.h (revision 1843)
+++ Anim19_OSDN/SB_Properties.h (revision 1844)
@@ -49,6 +49,7 @@
4949 bool Update_ListView_Counters();
5050 bool Update_ListView_Environs();
5151 bool Update_ListView_Particles();
52+ bool Update_ListView_Lights();
5253
5354 void Reset_Last_Selected_Object(int Index);
5455
@@ -89,6 +90,7 @@
8990 bool Edit_Counters_OnClick(LPARAM lParam);
9091 bool Edit_Environs_OnClick(LPARAM lParam);
9192 void Edit_Particle_Onclick(LPARAM lParam);
93+ void Edit_Light_Onclick(LPARAM lParam);
9294
9395
9496 char btext[20]; // ListView_GetItemText Text Holder for Compare [041221]
Show on old repository browser