@@ -52,34 +52,6 @@ py::class_<BResources>(m, "BResources")
5252.def (" HasResource" , py::overload_cast<type_code, int32>(&BResources::HasResource)," " ,py::arg (" type" ),py::arg (" id" ))
5353.def (" HasResource" , py::overload_cast<type_code,const char *>(&BResources::HasResource)," " ,py::arg (" type" ),py::arg (" name" ))
5454// .def("GetResourceInfo", py::overload_cast<int32, type_code *, int32*, const char * *, size_t *>(&BResources::GetResourceInfo), "", py::arg("byIndex"), py::arg("typeFound"), py::arg("idFound"), py::arg("nameFound"), py::arg("lengthFound"))
55- /* .def("GetResourceInfo", [](BResources& self, int32 byIndex) {
56- type_code typeFound;
57- int32 idFound;
58- const char* nameFound;
59- size_t lengthFound;
60- bool result = self.GetResourceInfo(byIndex, &typeFound, &idFound, &nameFound, &lengthFound);
61-
62- // Creare una lista Python per contenere i risultati
63- py::list resultList;
64-
65- // Iterare attraverso i dati restituiti estrarre ciascun blocco
66- size_t currentIndex = 0;
67- while (currentIndex < lengthFound) {
68- // Trova la lunghezza del blocco corrente
69- size_t currentBlockLength = strlen(nameFound + currentIndex);
70-
71- // Estrai il blocco corrente
72- std::string currentBlock(nameFound + currentIndex, currentBlockLength);
73-
74- // Aggiungi il blocco alla lista Python
75- resultList.append(py::bytes(currentBlock));
76-
77- // Passa al prossimo blocco
78- currentIndex += currentBlockLength + 1; // +1 per includere il terminatore nullo
79- }
80-
81- return py::make_tuple(result, static_cast<int>(typeFound), idFound, resultList);
82- }, "", py::arg("byIndex"))*/
8355.def (" GetResourceInfo" , [](BResources& self, int32 byIndex){
8456 type_code typeFound;
8557 int32 idFound;