mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 22:28:10 +00:00
added inventory objects loader routine
svn-id: r25936
This commit is contained in:
parent
c122d83c0e
commit
02d4001f57
@ -116,4 +116,20 @@ void loadFont(const char* name, Cnv* cnv) {
|
||||
_vm->_graphics->loadExternalCnv(path, cnv);
|
||||
}
|
||||
|
||||
// loads character's icons set
|
||||
|
||||
void openObjects(const char *name, Cnv* cnv) {
|
||||
|
||||
if (!scumm_strnicmp("mini", name, 4)) {
|
||||
name += 4;
|
||||
}
|
||||
|
||||
char path[PATH_LEN];
|
||||
sprintf(path, "%sobj", name);
|
||||
|
||||
_vm->_graphics->loadExternalCnv(path, cnv);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
} // namespace Parallaction
|
||||
|
@ -74,9 +74,12 @@ public:
|
||||
|
||||
void openLocation(const char *name, char* script);
|
||||
void openTalk(const char *name, Cnv *cnv);
|
||||
void openObjects(const char *name, Cnv *cnv);
|
||||
void loadPointer(StaticCnv* cnv);
|
||||
void loadHead(const char* name, StaticCnv* cnv);
|
||||
void loadFont(const char* name, Cnv* cnv);
|
||||
|
||||
|
||||
} // namespace Parallaction
|
||||
|
||||
|
||||
|
@ -22,6 +22,7 @@
|
||||
|
||||
|
||||
#include "parallaction/parallaction.h"
|
||||
#include "parallaction/disk.h"
|
||||
#include "parallaction/zone.h"
|
||||
#include "parallaction/graphics.h"
|
||||
#include "parallaction/inventory.h"
|
||||
@ -368,22 +369,10 @@ void cleanInventory() {
|
||||
}
|
||||
|
||||
|
||||
// loads character's icons set
|
||||
|
||||
void loadCharacterItems(const char *character) {
|
||||
|
||||
if (!scumm_strnicmp("mini", character, 4)) character += 4;
|
||||
|
||||
char filename[PATH_LEN];
|
||||
sprintf(filename, "%sobj", character);
|
||||
|
||||
_vm->_graphics->loadExternalCnv(filename, &_characterInventory);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
void refreshInventory(const char *character) {
|
||||
loadCharacterItems(character);
|
||||
openObjects(character, &_characterInventory);
|
||||
redrawInventory();
|
||||
_vm->_graphics->freeCnv(&_characterInventory);
|
||||
|
||||
@ -392,7 +381,7 @@ void refreshInventory(const char *character) {
|
||||
|
||||
|
||||
void refreshInventoryItem(const char *character, uint16 index) {
|
||||
loadCharacterItems(character);
|
||||
openObjects(character, &_characterInventory);
|
||||
drawInventoryItem(index, &_inventory[index]);
|
||||
_vm->_graphics->freeCnv(&_characterInventory);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user