diff -ur ScummVM-cvs20021105/scummvm/scumm/gfx.cpp ScummVM-cvs20021105+hack/scummvm/scumm/gfx.cpp
old
|
new
|
|
430 | 430 | size = itemsize * gdi._numZBuffer; |
431 | 431 | memset(createResource(rtBuffer, 9, size), 0, size); |
432 | 432 | |
433 | | for (i = 0; i < 4; i++) |
434 | | gdi._imgBufOffs[i] = i * itemsize; |
| 433 | for (i = 0; i < (int) ARRAYSIZE(gdi._imgBufOffs); i++) { |
| 434 | if (i < gdi._numZBuffer) |
| 435 | gdi._imgBufOffs[i] = i * itemsize; |
| 436 | else |
| 437 | gdi._imgBufOffs[i] = (gdi._numZBuffer - 1) * itemsize; |
| 438 | } |
435 | 439 | } |
436 | 440 | |
437 | 441 | void Scumm::setPaletteFromPtr(byte *ptr) |
diff -ur ScummVM-cvs20021105/scummvm/scumm/gfx.h ScummVM-cvs20021105+hack/scummvm/scumm/gfx.h
old
|
new
|
|
115 | 115 | uint _readOffs; |
116 | 116 | |
117 | 117 | int _numZBuffer; |
118 | | int _imgBufOffs[4]; |
| 118 | int _imgBufOffs[5]; |
119 | 119 | byte _disable_zbuffer; |
120 | 120 | int32 _numStrips; |
121 | 121 | |
diff -ur ScummVM-cvs20021105/scummvm/scumm/saveload.cpp ScummVM-cvs20021105+hack/scummvm/scumm/saveload.cpp
old
|
new
|
|
421 | 421 | |
422 | 422 | MKLINE(Scumm, _egoPositioned, sleByte), |
423 | 423 | |
| 424 | // FIXME: Should be 5, not 4 |
424 | 425 | MKARRAY(Scumm, gdi._imgBufOffs[0], sleUint16, 4), |
425 | 426 | MKLINE(Scumm, gdi._numZBuffer, sleByte), |
426 | 427 | |
… |
… |
|
532 | 533 | |
533 | 534 | MKLINE(Scumm, _egoPositioned, sleByte), |
534 | 535 | |
| 536 | // FIXME: Should be 5, not 4. |
535 | 537 | MKARRAY(Scumm, gdi._imgBufOffs[0], sleUint16, 4), |
536 | 538 | MKLINE(Scumm, gdi._numZBuffer, sleByte), |
537 | 539 | |