mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-22 01:57:16 +00:00
Made loadHead return a new Cnv instead of accepting a parameter.
svn-id: r26200
This commit is contained in:
parent
35cebe2444
commit
ec58e9ac05
@ -284,7 +284,7 @@ Script* Disk::loadScript(const char* name) {
|
||||
return new Script(buf, true);
|
||||
}
|
||||
|
||||
void Disk::loadHead(const char* name, StaticCnv* cnv) {
|
||||
StaticCnv* Disk::loadHead(const char* name) {
|
||||
|
||||
char path[PATH_LEN];
|
||||
/*
|
||||
@ -300,7 +300,9 @@ void Disk::loadHead(const char* name, StaticCnv* cnv) {
|
||||
snprintf(path, 8, "%shead", name);
|
||||
path[8] = '\0';
|
||||
|
||||
StaticCnv *cnv = new StaticCnv;
|
||||
loadExternalStaticCnv(path, cnv);
|
||||
return cnv;
|
||||
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ public:
|
||||
Cnv* loadTalk(const char *name);
|
||||
void loadObjects(const char *name, Cnv *cnv);
|
||||
void loadPointer(StaticCnv* cnv);
|
||||
void loadHead(const char* name, StaticCnv* cnv);
|
||||
StaticCnv* loadHead(const char* name);
|
||||
void loadFont(const char* name, Cnv* cnv);
|
||||
void loadStatic(const char* name, StaticCnv* cnv);
|
||||
void loadFrames(const char* name, Cnv* cnv);
|
||||
|
@ -725,10 +725,13 @@ void freeCharacter() {
|
||||
if (!IS_DUMMY_CHARACTER(_vm->_characterName)) {
|
||||
_vm->_gfx->freeCnv(&_vm->_char._miniFrames);
|
||||
_vm->freeTable(_objectsNames);
|
||||
|
||||
_vm->_gfx->freeCnv(_vm->_char._talk);
|
||||
if (_vm->_char._talk) delete _vm->_char._talk;
|
||||
|
||||
_vm->_gfx->freeStaticCnv(&_vm->_char._head);
|
||||
_vm->_gfx->freeStaticCnv(_vm->_char._head);
|
||||
if (_vm->_char._head) delete _vm->_char._head;
|
||||
|
||||
_vm->_gfx->freeCnv(&_vm->_char._objs);
|
||||
}
|
||||
|
||||
@ -806,7 +809,7 @@ void Parallaction::changeCharacter(const char *name) {
|
||||
_disk->loadFrames(path, &_vm->_char._normalFrames);
|
||||
|
||||
if (!IS_DUMMY_CHARACTER(name)) {
|
||||
_disk->loadHead(path, &_vm->_char._head);
|
||||
_vm->_char._head = _disk->loadHead(path);
|
||||
_vm->_char._talk = _disk->loadTalk(path);
|
||||
_disk->loadObjects(name, &_vm->_char._objs);
|
||||
|
||||
|
@ -236,7 +236,7 @@ struct Location {
|
||||
|
||||
struct Character {
|
||||
Animation _ani;
|
||||
StaticCnv _head;
|
||||
StaticCnv *_head;
|
||||
Cnv *_talk;
|
||||
Cnv _normalFrames;
|
||||
Cnv _miniFrames;
|
||||
@ -249,10 +249,11 @@ struct Character {
|
||||
// _talk._count = 0;
|
||||
// _talk._array = NULL;
|
||||
|
||||
_head._width = 0;
|
||||
_head._height = 0;
|
||||
_head._data0 = NULL;
|
||||
_head._data1 = NULL;
|
||||
_head = NULL;
|
||||
// _head._width = 0;
|
||||
// _head._height = 0;
|
||||
// _head._data0 = NULL;
|
||||
// _head._data1 = NULL;
|
||||
|
||||
_objs._count = 0;
|
||||
|
||||
|
@ -414,7 +414,7 @@ void displayItemComment(ExamineData *data) {
|
||||
Common::Rect r(v6C, v6A);
|
||||
r.moveTo(0, 90);
|
||||
_vm->_gfx->drawBalloon(r, 0);
|
||||
_vm->_gfx->flatBlitCnv(&_vm->_char._head, 100, 152, Gfx::kBitFront);
|
||||
_vm->_gfx->flatBlitCnv(_vm->_char._head, 100, 152, Gfx::kBitFront);
|
||||
_vm->_gfx->displayWrappedString(data->_description, 0, 90, 130, 0);
|
||||
|
||||
jobEraseAnimations((void*)1, NULL);
|
||||
|
Loading…
x
Reference in New Issue
Block a user