@@ -58,17 +58,42 @@ py::class_<BResources>(m, "BResources")
5858const char * nameFound;
5959size_t lengthFound;
6060bool result = self.GetResourceInfo (byIndex, &typeFound, &idFound, &nameFound, &lengthFound);
61-
62- // Utilizza py::bytes per rappresentare la sequenza di byte
61+
6362 py::bytesbyteSequence (nameFound, lengthFound);
6463
6564return py::make_tuple (result,static_cast <int >(typeFound), idFound, byteSequence, lengthFound);
6665}," " ,py::arg (" byIndex" ))
6766
6867// .def("GetResourceInfo", py::overload_cast<type_code, int32, int32*, const char * *, size_t *>(&BResources::GetResourceInfo), "", py::arg("byType"), py::arg("andIndex"), py::arg("idFound"), py::arg("nameFound"), py::arg("lengthFound"))
68+ .def (" GetResourceInfo" , [](BResources& self, type_code byType, int32 andIndex){
69+ int32 idFound;
70+ const char * nameFound;
71+ size_t lengthFound;
72+ bool result = self.GetResourceInfo (byType, andIndex, &idFound, &nameFound, &lengthFound);
73+
74+ py::bytesbyteSequence (nameFound, lengthFound);
75+
76+ return py::make_tuple (result, idFound, byteSequence, lengthFound);
77+ }," " ,py::arg (" byType" ),py::arg (" andIndex" ))
6978// .def("GetResourceInfo", py::overload_cast<type_code, int32, const char * *, size_t *>(&BResources::GetResourceInfo), "", py::arg("byType"), py::arg("andID"), py::arg("nameFound"), py::arg("lengthFound"))
70- .def (" GetResourceInfo" , py::overload_cast<type_code,const char *, int32*,size_t *>(&BResources::GetResourceInfo)," " ,py::arg (" byType" ),py::arg (" andName" ),py::arg (" idFound" ),py::arg (" lengthFound" ))
71- // .def("GetResourceInfo", py::overload_cast<const void *, type_code *, int32*, size_t *, const char * *>(&BResources::GetResourceInfo), "", py::arg("byPointer"), py::arg("typeFound"), py::arg("idFound"), py::arg("lengthFound"), py::arg("nameFound"))
79+ .def (" GetResourceInfo" , [](BResources& self, type_code byType, int32 andID){
80+ const char * nameFound;
81+ size_t lengthFound;
82+ bool result = self.GetResourceInfo (byType, andID, &nameFound, &lengthFound);
83+
84+ py::bytesbyteSequence (nameFound, lengthFound);
85+
86+ return py::make_tuple (result, byteSequence, lengthFound);
87+ }," " ,py::arg (" byType" ),py::arg (" andID" ))
88+ // .def("GetResourceInfo", py::overload_cast<type_code, const char *, int32*, size_t *>(&BResources::GetResourceInfo), "", py::arg("byType"), py::arg("andName"), py::arg("idFound"), py::arg("lengthFound"))// <- TODO!!
89+ .def (" GetResourceInfo" , [](BResources& self, type_code byType,const char * andName){
90+ int32 idFound;
91+ size_t lengthFound;
92+ bool result = self.GetResourceInfo (byType, andName, &idFound, &lengthFound);
93+
94+ return py::make_tuple (result, idFound, lengthFound);
95+ }," " ,py::arg (" byType" ),py::arg (" andID" ))
96+ // .def("GetResourceInfo", py::overload_cast<const void *, type_code *, int32*, size_t *, const char * *>(&BResources::GetResourceInfo), "", py::arg("byPointer"), py::arg("typeFound"), py::arg("idFound"), py::arg("lengthFound"), py::arg("nameFound")) //<- There's no pointer in Python
7297.def (" RemoveResource" , py::overload_cast<const void *>(&BResources::RemoveResource)," " ,py::arg (" resource" ))
7398.def (" RemoveResource" , py::overload_cast<type_code, int32>(&BResources::RemoveResource)," " ,py::arg (" type" ),py::arg (" id" ))
7499.def (" WriteResource" , &BResources::WriteResource," " ,py::arg (" type" ),py::arg (" id" ),py::arg (" data" ),py::arg (" offset" ),py::arg (" length" ))