RCS file: /cvsroot/scummvm/scummvm/resource.cpp,v
retrieving revision 1.19
diff -u -r1.19 resource.cpp
|
|
|
341 | 341 | int num; |
342 | 342 | int i; |
343 | 343 | |
344 | | debug(9, "readResTypeList(%d,%x,%s)",id,FROM_LE_32(tag),name); |
| 344 | debug(9, "readResTypeList(%s,%x,%s)",res.name[id],FROM_LE_32(tag),name); |
345 | 345 | |
346 | 346 | num = fileReadWordLE(); |
347 | 347 | |
… |
… |
|
367 | 367 | |
368 | 368 | |
369 | 369 | void Scumm::allocResTypeData(int id, uint32 tag, int num, const char *name, int mode) { |
370 | | debug(9, "allocResTypeData(%d,%x,%d,%s,%d)",id,FROM_LE_32(tag),num,name,mode); |
| 370 | debug(9, "allocResTypeData(%s,%x,%d,%d)",name,FROM_LE_32(tag),num,mode); |
371 | 371 | assert(id>=0 && id<sizeof(res.mode)/sizeof(res.mode[0])); |
372 | 372 | |
373 | 373 | if (num>=512) { |
… |
… |
|
410 | 410 | void Scumm::ensureResourceLoaded(int type, int i) { |
411 | 411 | void *addr; |
412 | 412 | |
413 | | debug(9, "ensureResourceLoaded(%d,%d)", type, i); |
| 413 | debug(9, "ensureResourceLoaded(%s,%d)",res.name[type], i); |
414 | 414 | |
415 | 415 | if (type==rtRoom && i>127) { |
416 | 416 | i = _resourceMapper[i&127]; |
… |
… |
|
434 | 434 | uint32 fileOffs; |
435 | 435 | uint32 size, tag; |
436 | 436 | |
437 | | debug(9, "loadResource(%d,%d)", type,index); |
| 437 | debug(9, "loadResource(%s,%d)",res.name[type], index); |
438 | 438 | |
439 | 439 | roomNr = getResourceRoomNr(type, index); |
440 | 440 | if (roomNr == 0 || index >= res.num[type]) { |
… |
… |
|
464 | 464 | tag = fileReadDword(); |
465 | 465 | |
466 | 466 | if (tag != res.tags[type]) { |
467 | | error("%s %d not in room %d at %d+%d", |
468 | | res.name[type], type, roomNr, _fileOffset, fileOffs); |
| 467 | error("%s not in room %d at %d+%d", |
| 468 | res.name[type], roomNr, _fileOffset, fileOffs); |
469 | 469 | } |
470 | 470 | |
471 | 471 | size = fileReadDwordBE(); |
… |
… |
|
496 | 496 | byte *ptr; |
497 | 497 | int i; |
498 | 498 | |
499 | | debug(9, "readSoundResource(%d,%d)", type, index); |
| 499 | debug(9, "readSoundResource(%s,%d)",res.name[type], index); |
500 | 500 | |
501 | 501 | resStart = 0; |
502 | 502 | |
… |
… |
|
541 | 541 | byte *Scumm::getResourceAddress(int type, int index) { |
542 | 542 | byte *ptr; |
543 | 543 | |
544 | | debug(9, "getResourceAddress(%d,%d)", type, index); |
| 544 | debug(9, "getResourceAddress(%s,%d)",res.name[type], index); |
545 | 545 | |
546 | 546 | CHECK_HEAP |
547 | 547 | |
… |
… |
|
583 | 583 | |
584 | 584 | CHECK_HEAP |
585 | 585 | |
586 | | debug(9, "createResource(%d,%d,%d)", type, index,size); |
| 586 | debug(9, "createResource(%s,%d,%d)",res.name[type], index,size); |
587 | 587 | |
588 | 588 | if (size > 65536*4+37856) |
589 | 589 | error("Invalid size allocating"); |
… |
… |
|
610 | 610 | |
611 | 611 | void Scumm::validateResource(const char *str, int type, int index) { |
612 | 612 | if (type<rtFirst || type>rtLast || (uint)index >= (uint)res.num[type]) { |
613 | | error("%d Illegal Glob type %d num %d", str, type, index); |
| 613 | error("%d Illegal Glob type %s num %d", str, res.name[type], index); |
614 | 614 | } |
615 | 615 | } |
616 | 616 | |
617 | 617 | void Scumm::nukeResource(int type, int index) { |
618 | 618 | byte *ptr; |
619 | 619 | |
620 | | debug(9, "nukeResource(%d,%d)", type, index); |
| 620 | debug(9, "nukeResource(%s,%d)",res.name[type], index); |
621 | 621 | |
622 | 622 | CHECK_HEAP |
623 | 623 | assert( res.address[type] ); |