From: Laszlo T. <ave...@us...> - 2006-08-19 20:22:14
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/GUIScript In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv18933/GUIScript Modified Files: GUIScript.cpp Log Message: added portraits path to the searched path SetButtonPicture: added code to try use png for the resource if possible Index: GUIScript.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/GUIScript/GUIScript.cpp,v retrieving revision 1.411 retrieving revision 1.412 diff -C2 -d -r1.411 -r1.412 *** GUIScript.cpp 16 Aug 2006 18:35:04 -0000 1.411 --- GUIScript.cpp 19 Aug 2006 20:22:12 -0000 1.412 *************** *** 2524,2536 **** } ! DataStream* str = core->GetResourceMgr()->GetResource( ResRef, IE_BMP_CLASS_ID ); //default portrait if (str == NULL && DefResRef) { ! str = core->GetResourceMgr()->GetResource( DefResRef, IE_BMP_CLASS_ID ); } if (str == NULL) { return NULL; } ! ImageMgr* im = ( ImageMgr* ) core->GetInterface( IE_BMP_CLASS_ID ); if (im == NULL) { delete ( str ); --- 2524,2545 ---- } ! ResourceMgr * rm = core->GetResourceMgr(); ! DataStream* str; ! int restype = IE_BMP_CLASS_ID; ! ! if (rm->HasResource(ResRef, IE_PNG_CLASS_ID) ) { ! str = rm->GetResource( ResRef, IE_PNG_CLASS_ID ); ! restype = IE_PNG_CLASS_ID; ! } else { ! str = rm->GetResource( ResRef, IE_BMP_CLASS_ID ); ! } //default portrait if (str == NULL && DefResRef) { ! str = rm->GetResource( DefResRef, IE_BMP_CLASS_ID ); } if (str == NULL) { return NULL; } ! ImageMgr* im = ( ImageMgr* ) core->GetInterface( restype ); if (im == NULL) { delete ( str ); *************** *** 5662,5668 **** "Returns dict with specified item." ); ! #define CAN_DRINK 1 //potions ! #define CAN_READ 2 //scrolls ! #define CAN_STUFF 4 //containers static PyObject* GemRB_GetItem(PyObject * /*self*/, PyObject* args) --- 5671,5677 ---- "Returns dict with specified item." ); ! #define CAN_DRINK 1 //potions ! #define CAN_READ 2 //scrolls ! #define CAN_STUFF 4 //containers static PyObject* GemRB_GetItem(PyObject * /*self*/, PyObject* args) |