diff -ur ScummVM+orig/scummvm/common/scummsys.h ScummVM+hack/scummvm/common/scummsys.h
old
|
new
|
|
347 | 347 | return (b[0] << 24) + (b[1] << 16) + (b[2] << 8) + (b[3]); |
348 | 348 | } |
349 | 349 | |
350 | | #define READ_BE_UINT32_UNALIGNED READ_BE_UINT32 |
351 | | #define READ_BE_UINT16_UNALIGNED READ_BE_UINT16 |
| 350 | #define READ_UINT32(a) READ_LE_UINT32(a) |
352 | 351 | |
353 | | #define READ_UINT32_UNALIGNED(a) READ_LE_UINT32(a) |
| 352 | #define FROM_LE_32(a) (a) |
| 353 | #define FROM_LE_16(a) (a) |
354 | 354 | |
355 | | #define FROM_LE_32(__a__) __a__ |
356 | | #define FROM_LE_16(__a__) __a__ |
357 | | |
358 | | #define TO_LE_32(__a__) __a__ |
359 | | #define TO_LE_16(__a__) __a__ |
| 355 | #define TO_LE_32(a) (a) |
| 356 | #define TO_LE_16(a) (a) |
360 | 357 | |
361 | 358 | #define TO_BE_32(a) SWAP_BYTES(a) |
362 | 359 | |
… |
… |
|
368 | 365 | #define MKID_BE(a) (a) |
369 | 366 | //#define MKID_BE(a) SWAP_BYTES(a) |
370 | 367 | |
371 | | FORCEINLINE uint32 FROM_LE_32(uint32 a) { |
372 | | return ((a >> 24) & 0xFF) + ((a >> 8) & 0xFF00) + (( a<< 8) & 0xFF0000) \ |
373 | | + ((a<<24)&0xFF000000); |
374 | | } |
375 | | |
376 | | FORCEINLINE uint16 FROM_LE_16(uint16 a) { |
377 | | return ((a >> 8) & 0xFF) + ((a << 8) & 0xFF00); |
| 368 | FORCEINLINE uint READ_LE_UINT16(const void *ptr) { |
| 369 | const byte *b = (const byte *)ptr; |
| 370 | return (b[1] << 8) + b[0]; |
378 | 371 | } |
379 | 372 | |
380 | | #define TO_LE_32 FROM_LE_32 |
381 | | #define TO_LE_16 FROM_LE_16 |
| 373 | #if defined(SCUMM_NEED_ALIGNMENT) |
| 374 | FORCEINLINE uint READ_BE_UINT16(const void *ptr) { |
| 375 | return (((const byte *)ptr)[0] << 8)|((const byte *)ptr)[1]; |
| 376 | } |
| 377 | #else |
| 378 | FORCEINLINE uint READ_BE_UINT16(const void *ptr) { |
| 379 | return *(const uint16 *)(ptr); |
| 380 | } |
| 381 | #endif |
382 | 382 | |
383 | 383 | FORCEINLINE uint32 READ_LE_UINT32(const void *ptr) { |
384 | 384 | const byte *b = (const byte *)ptr; |
385 | 385 | return (b[3] << 24) + (b[2] << 16) + (b[1] << 8) + (b[0]); |
386 | 386 | } |
387 | 387 | |
388 | | FORCEINLINE uint32 READ_BE_UINT32(const void *ptr) { |
389 | | return *(const uint32 *)(ptr); |
390 | | } |
391 | | |
392 | | FORCEINLINE uint READ_LE_UINT16(const void *ptr) { |
393 | | const byte *b = (const byte *)ptr; |
394 | | return (b[1] << 8) + b[0]; |
395 | | } |
| 388 | #if defined(SCUMM_NEED_ALIGNMENT) |
| 389 | FORCEINLINE uint32 READ_BE_UINT32(const void *ptr) { |
| 390 | const byte *b = (const byte*)ptr; |
| 391 | return (b[0] << 24) + (b[1] << 16) + (b[2] << 8) + (b[3]); |
| 392 | } |
| 393 | #else |
| 394 | FORCEINLINE uint32 READ_BE_UINT32(const void *ptr) { |
| 395 | return *(const uint32 *)(ptr); |
| 396 | } |
| 397 | #endif |
396 | 398 | |
397 | | FORCEINLINE uint READ_BE_UINT16(const void *ptr) { |
398 | | return *(const uint16 *)(ptr); |
| 399 | FORCEINLINE uint32 FROM_LE_32(uint32 a) { |
| 400 | return ((a >> 24) & 0xFF) + ((a >> 8) & 0xFF00) + (( a<< 8) & 0xFF0000) \ |
| 401 | + ((a<<24)&0xFF000000); |
399 | 402 | } |
400 | 403 | |
401 | | FORCEINLINE uint READ_BE_UINT16_UNALIGNED(const void *ptr) { |
402 | | return (((const byte *)ptr)[0] << 8)|((const byte *)ptr)[1]; |
| 404 | FORCEINLINE uint16 FROM_LE_16(uint16 a) { |
| 405 | return ((a >> 8) & 0xFF) + ((a << 8) & 0xFF00); |
403 | 406 | } |
404 | 407 | |
405 | | FORCEINLINE uint32 READ_BE_UINT32_UNALIGNED(const void *ptr) { |
406 | | const byte *b = (const byte*)ptr; |
407 | | return (b[0] << 24) + (b[1] << 16) + (b[2] << 8) + (b[3]); |
408 | | } |
| 408 | #define READ_UINT32(a) READ_BE_UINT32(a) |
409 | 409 | |
410 | | #define READ_UINT32_UNALIGNED READ_BE_UINT32_UNALIGNED |
| 410 | #define TO_LE_32 FROM_LE_32 |
| 411 | #define TO_LE_16 FROM_LE_16 |
411 | 412 | |
412 | 413 | #define TO_BE_32(a) (a) |
413 | 414 | #define TO_BE_16(a) (a) |
diff -ur ScummVM+orig/scummvm/scumm/akos.cpp ScummVM+hack/scummvm/scumm/akos.cpp
old
|
new
|
|
255 | 255 | if (code != AKC_ComplexChan) { |
256 | 256 | off = akof + (code & 0xFFF); |
257 | 257 | |
258 | | assert((code & 0xFFF) * 6 < READ_BE_UINT32_UNALIGNED((const byte *)akof - 4) - 8); |
| 258 | assert((code & 0xFFF) * 6 < READ_BE_UINT32((const byte *)akof - 4) - 8); |
259 | 259 | assert((code & 0x7000) == 0); |
260 | 260 | |
261 | 261 | _srcptr = akcd + READ_LE_UINT32(&off->akcd); |
diff -ur ScummVM+orig/scummvm/scumm/gfx.cpp ScummVM+hack/scummvm/scumm/gfx.cpp
old
|
new
|
|
2619 | 2619 | |
2620 | 2620 | ptr += 2; |
2621 | 2621 | cycl->counter = 0; |
2622 | | cycl->delay = 16384 / READ_BE_UINT16_UNALIGNED(ptr); |
| 2622 | cycl->delay = 16384 / READ_BE_UINT16(ptr); |
2623 | 2623 | ptr += 2; |
2624 | | cycl->flags = READ_BE_UINT16_UNALIGNED(ptr); |
| 2624 | cycl->flags = READ_BE_UINT16(ptr); |
2625 | 2625 | ptr += 2; |
2626 | 2626 | cycl->start = *ptr++; |
2627 | 2627 | cycl->end = *ptr++; |
diff -ur ScummVM+orig/scummvm/scumm/imuse.cpp ScummVM+hack/scummvm/scumm/imuse.cpp
old
|
new
|
|
100 | 100 | } |
101 | 101 | |
102 | 102 | ptr += 8; |
103 | | size = READ_BE_UINT32_UNALIGNED(ptr); |
| 103 | size = READ_BE_UINT32(ptr); |
104 | 104 | ptr += 4; |
105 | 105 | |
106 | 106 | // Okay, we're looking for one of those things: either |
diff -ur ScummVM+orig/scummvm/scumm/imuse_digi.cpp ScummVM+hack/scummvm/scumm/imuse_digi.cpp
old
|
new
|
|
803 | 803 | |
804 | 804 | uint32 tag, size = 0, r, t; |
805 | 805 | |
806 | | if (READ_UINT32_UNALIGNED(ptr) == MKID('Crea')) { |
| 806 | if (READ_UINT32(ptr) == MKID('Crea')) { |
807 | 807 | _channel[l]._bits = 8; |
808 | 808 | _channel[l]._channels = 2; |
809 | 809 | _channel[l]._mixerSize = (22050 / 5) * 2; |
… |
… |
|
827 | 827 | } |
828 | 828 | free(t_ptr); |
829 | 829 | _channel[l]._size = size; |
830 | | } else if (READ_UINT32_UNALIGNED(ptr) == MKID('iMUS')) { |
| 830 | } else if (READ_UINT32(ptr) == MKID('iMUS')) { |
831 | 831 | ptr += 16; |
832 | 832 | for (;;) { |
833 | | tag = READ_BE_UINT32_UNALIGNED(ptr); ptr += 4; |
| 833 | tag = READ_BE_UINT32(ptr); ptr += 4; |
834 | 834 | switch(tag) { |
835 | 835 | case MKID_BE('FRMT'): |
836 | 836 | ptr += 12; |
837 | | _channel[l]._bits = READ_BE_UINT32_UNALIGNED(ptr); ptr += 4; |
838 | | _channel[l]._freq = READ_BE_UINT32_UNALIGNED(ptr); ptr += 4; |
839 | | _channel[l]._channels = READ_BE_UINT32_UNALIGNED(ptr); ptr += 4; |
| 837 | _channel[l]._bits = READ_BE_UINT32(ptr); ptr += 4; |
| 838 | _channel[l]._freq = READ_BE_UINT32(ptr); ptr += 4; |
| 839 | _channel[l]._channels = READ_BE_UINT32(ptr); ptr += 4; |
840 | 840 | break; |
841 | 841 | case MKID_BE('TEXT'): |
842 | | size = READ_BE_UINT32_UNALIGNED(ptr); ptr += size + 4; |
| 842 | size = READ_BE_UINT32(ptr); ptr += size + 4; |
843 | 843 | break; |
844 | 844 | case MKID_BE('REGN'): |
845 | 845 | ptr += 4; |
… |
… |
|
848 | 848 | ptr += 8; |
849 | 849 | break; |
850 | 850 | } |
851 | | _channel[l]._region[_channel[l]._numRegions]._offset = READ_BE_UINT32_UNALIGNED(ptr); ptr += 4; |
852 | | _channel[l]._region[_channel[l]._numRegions]._length = READ_BE_UINT32_UNALIGNED(ptr); ptr += 4; |
| 851 | _channel[l]._region[_channel[l]._numRegions]._offset = READ_BE_UINT32(ptr); ptr += 4; |
| 852 | _channel[l]._region[_channel[l]._numRegions]._length = READ_BE_UINT32(ptr); ptr += 4; |
853 | 853 | _channel[l]._numRegions++; |
854 | 854 | break; |
855 | 855 | case MKID_BE('STOP'): |
856 | 856 | ptr += 4; |
857 | | _channel[l]._offsetStop = READ_BE_UINT32_UNALIGNED(ptr); ptr += 4; |
| 857 | _channel[l]._offsetStop = READ_BE_UINT32(ptr); ptr += 4; |
858 | 858 | break; |
859 | 859 | case MKID_BE('JUMP'): |
860 | 860 | ptr += 4; |
… |
… |
|
863 | 863 | ptr += 16; |
864 | 864 | break; |
865 | 865 | } |
866 | | _channel[l]._jump[_channel[l]._numJumps]._offset = READ_BE_UINT32_UNALIGNED(ptr); ptr += 4; |
867 | | _channel[l]._jump[_channel[l]._numJumps]._dest = READ_BE_UINT32_UNALIGNED(ptr); ptr += 4; |
868 | | _channel[l]._jump[_channel[l]._numJumps]._id = READ_BE_UINT32_UNALIGNED(ptr); ptr += 4; |
869 | | _channel[l]._jump[_channel[l]._numJumps]._numLoops = READ_BE_UINT32_UNALIGNED(ptr); ptr += 4; |
| 866 | _channel[l]._jump[_channel[l]._numJumps]._offset = READ_BE_UINT32(ptr); ptr += 4; |
| 867 | _channel[l]._jump[_channel[l]._numJumps]._dest = READ_BE_UINT32(ptr); ptr += 4; |
| 868 | _channel[l]._jump[_channel[l]._numJumps]._id = READ_BE_UINT32(ptr); ptr += 4; |
| 869 | _channel[l]._jump[_channel[l]._numJumps]._numLoops = READ_BE_UINT32(ptr); ptr += 4; |
870 | 870 | _channel[l]._isJump = true; |
871 | 871 | _channel[l]._numJumps++; |
872 | 872 | break; |
873 | 873 | case MKID_BE('DATA'): |
874 | | size = READ_BE_UINT32_UNALIGNED(ptr); ptr += 4; |
| 874 | size = READ_BE_UINT32(ptr); ptr += 4; |
875 | 875 | break; |
876 | 876 | default: |
877 | 877 | error("IMuseDigital::startSound(%d) Unknown sfx header %c%c%c%c", sound, (byte)(tag >> 24), (byte)(tag >> 16), (byte)(tag >> 8), (byte)tag); |
diff -ur ScummVM+orig/scummvm/scumm/object.cpp ScummVM+hack/scummvm/scumm/object.cpp
old
|
new
|
|
973 | 973 | if (whereIsObject(obj) == WIO_FLOBJECT) { |
974 | 974 | i = getObjectIndex(obj); |
975 | 975 | ptr = getResourceAddress(rtFlObject, _objs[i].fl_object_index) + 8; |
976 | | size = READ_BE_UINT32_UNALIGNED(ptr + 4); |
| 976 | size = READ_BE_UINT32(ptr + 4); |
977 | 977 | } else { |
978 | 978 | findObjectInRoom(&foir, foCodeHeader, obj, room); |
979 | 979 | if (_features & GF_OLD_BUNDLE) |
… |
… |
|
981 | 981 | else if (_features & GF_SMALL_HEADER) |
982 | 982 | size = READ_LE_UINT32(foir.obcd); |
983 | 983 | else |
984 | | size = READ_BE_UINT32_UNALIGNED(foir.obcd + 4); |
| 984 | size = READ_BE_UINT32(foir.obcd + 4); |
985 | 985 | ptr = foir.obcd; |
986 | 986 | } |
987 | 987 | |
… |
… |
|
1352 | 1352 | if (dataptr == NULL) |
1353 | 1353 | error("setCursorImg: No such image"); |
1354 | 1354 | |
1355 | | size = READ_BE_UINT32_UNALIGNED(dataptr + 4); |
| 1355 | size = READ_BE_UINT32(dataptr + 4); |
1356 | 1356 | if (size > sizeof(_grabbedCursor)) |
1357 | 1357 | error("setCursorImg: Cursor image too large"); |
1358 | 1358 | |
… |
… |
|
1628 | 1628 | } |
1629 | 1629 | |
1630 | 1630 | // Setup sizes |
1631 | | obcd_size = READ_BE_UINT32_UNALIGNED(foir.obcd + 4); |
| 1631 | obcd_size = READ_BE_UINT32(foir.obcd + 4); |
1632 | 1632 | od->OBCDoffset = 8; |
1633 | 1633 | od->OBIMoffset = obcd_size + 8; |
1634 | | obim_size = READ_BE_UINT32_UNALIGNED(foir.obim + 4); |
| 1634 | obim_size = READ_BE_UINT32(foir.obim + 4); |
1635 | 1635 | flob_size = obcd_size + obim_size + 8; |
1636 | 1636 | |
1637 | 1637 | // Lock room/roomScripts for the given room. They contains the OBCD/OBIM |
diff -ur ScummVM+orig/scummvm/scumm/resource.cpp ScummVM+hack/scummvm/scumm/resource.cpp
old
|
new
|
|
1366 | 1366 | else if (_features & GF_SMALL_HEADER) |
1367 | 1367 | return READ_LE_UINT32(ptr) - 6; |
1368 | 1368 | else |
1369 | | return READ_BE_UINT32_UNALIGNED(ptr - 4) - 8; |
| 1369 | return READ_BE_UINT32(ptr - 4) - 8; |
1370 | 1370 | } |
1371 | 1371 | |
1372 | 1372 | struct FindResourceState { |
… |
… |
|
1381 | 1381 | FindResourceState *f = &frs; /* easier to make it thread safe like this */ |
1382 | 1382 | |
1383 | 1383 | if (searchin) { |
1384 | | f->size = READ_BE_UINT32_UNALIGNED(searchin + 4); |
| 1384 | f->size = READ_BE_UINT32(searchin + 4); |
1385 | 1385 | f->pos = 8; |
1386 | 1386 | f->ptr = searchin + 8; |
1387 | 1387 | goto StartScan; |
1388 | 1388 | } |
1389 | 1389 | |
1390 | 1390 | do { |
1391 | | size = READ_BE_UINT32_UNALIGNED(f->ptr + 4); |
| 1391 | size = READ_BE_UINT32(f->ptr + 4); |
1392 | 1392 | if ((int32)size <= 0) |
1393 | 1393 | return NULL; |
1394 | 1394 | |
… |
… |
|
1398 | 1398 | StartScan: |
1399 | 1399 | if (f->pos >= f->size) |
1400 | 1400 | return NULL; |
1401 | | } while (READ_UINT32_UNALIGNED(f->ptr) != tag); |
| 1401 | } while (READ_UINT32(f->ptr) != tag); |
1402 | 1402 | |
1403 | 1403 | return f->ptr; |
1404 | 1404 | } |
… |
… |
|
1440 | 1440 | assert(searchin); |
1441 | 1441 | |
1442 | 1442 | searchin += 4; |
1443 | | totalsize = READ_BE_UINT32_UNALIGNED(searchin); |
| 1443 | totalsize = READ_BE_UINT32(searchin); |
1444 | 1444 | curpos = 8; |
1445 | 1445 | searchin += 4; |
1446 | 1446 | |
1447 | 1447 | while (curpos < totalsize) { |
1448 | | if (READ_UINT32_UNALIGNED(searchin) == tag && !idx--) |
| 1448 | if (READ_UINT32(searchin) == tag && !idx--) |
1449 | 1449 | return searchin; |
1450 | 1450 | |
1451 | | size = READ_BE_UINT32_UNALIGNED(searchin + 4); |
| 1451 | size = READ_BE_UINT32(searchin + 4); |
1452 | 1452 | if ((int32)size <= 0) { |
1453 | 1453 | error("(%c%c%c%c) Not found in %d... illegal block len %d", |
1454 | 1454 | tag & 0xFF, (tag >> 8) & 0xFF, (tag >> 16) & 0xFF, (tag >> 24) & 0xFF, 0, size); |
diff -ur ScummVM+orig/scummvm/scumm/resource.h ScummVM+hack/scummvm/scumm/resource.h
old
|
new
|
|
34 | 34 | #endif |
35 | 35 | |
36 | 36 | #define RES_DATA(x) (((const byte*)x) + sizeof(ResHdr)) |
37 | | #define RES_SIZE(x) (READ_BE_UINT32_UNALIGNED(&((const ResHdr* )x)->size)) |
| 37 | #define RES_SIZE(x) (READ_BE_UINT32(&((const ResHdr* )x)->size)) |
38 | 38 | |
39 | 39 | enum { |
40 | 40 | OF_OWNER_MASK = 0x0F, |
diff -ur ScummVM+orig/scummvm/scumm/script_v5.cpp ScummVM+hack/scummvm/scumm/script_v5.cpp
old
|
new
|
|
1951 | 1951 | assert(searchin); |
1952 | 1952 | |
1953 | 1953 | searchin += 4; |
1954 | | totalsize = READ_BE_UINT32_UNALIGNED(searchin); |
| 1954 | totalsize = READ_BE_UINT32(searchin); |
1955 | 1955 | curpos = 8; |
1956 | 1956 | searchin += 4; |
1957 | 1957 | |
1958 | 1958 | while (curpos < totalsize) { |
1959 | | if (READ_UINT32_UNALIGNED(searchin) == tag) { |
| 1959 | if (READ_UINT32(searchin) == tag) { |
1960 | 1960 | name = searchin + _resourceHeaderSize; |
1961 | 1961 | break; |
1962 | 1962 | } |
1963 | 1963 | |
1964 | | size = READ_BE_UINT32_UNALIGNED(searchin + 4); |
| 1964 | size = READ_BE_UINT32(searchin + 4); |
1965 | 1965 | if ((int32)size <= 0) { |
1966 | 1966 | error("(%c%c%c%c) Not found in %d... illegal block len %d", |
1967 | 1967 | tag & 0xFF, (tag >> 8) & 0xFF, (tag >> 16) & 0xFF, (tag >> 24) & 0xFF, 0, size); |
diff -ur ScummVM+orig/scummvm/scumm/scummvm.cpp ScummVM+hack/scummvm/scumm/scummvm.cpp
old
|
new
|
|
1780 | 1780 | else if (_features & GF_SMALL_HEADER) |
1781 | 1781 | size = READ_LE_UINT32(ptr); |
1782 | 1782 | else |
1783 | | size = READ_BE_UINT32_UNALIGNED(ptr + 4); |
| 1783 | size = READ_BE_UINT32(ptr + 4); |
1784 | 1784 | |
1785 | 1785 | #if defined(MACOS_CARBON) |
1786 | 1786 | sprintf(buf, ":dumps:%s%d.dmp", tag, idx); |
diff -ur ScummVM+orig/scummvm/scumm/sound.cpp ScummVM+hack/scummvm/scumm/sound.cpp
old
|
new
|
|
180 | 180 | debug(3,"playSound #%d (room %d)", soundID, _scumm->getResourceRoomNr(rtSound, soundID)); |
181 | 181 | ptr = _scumm->getResourceAddress(rtSound, soundID); |
182 | 182 | if (ptr) { |
183 | | if (READ_UINT32_UNALIGNED(ptr) == MKID('iMUS')){ |
| 183 | if (READ_UINT32(ptr) == MKID('iMUS')){ |
184 | 184 | assert(_scumm->_imuseDigital); |
185 | 185 | _scumm->_imuseDigital->startSound(soundID); |
186 | 186 | return; |
187 | 187 | } |
188 | | else if (READ_UINT32_UNALIGNED(ptr) == MKID('Crea')) { |
| 188 | else if (READ_UINT32(ptr) == MKID('Crea')) { |
189 | 189 | assert(_scumm->_imuseDigital); |
190 | 190 | _scumm->_imuseDigital->startSound(soundID); |
191 | 191 | return; |
192 | 192 | } |
193 | | else if (READ_UINT32_UNALIGNED(ptr) == MKID('SOUN')) { |
| 193 | else if (READ_UINT32(ptr) == MKID('SOUN')) { |
194 | 194 | ptr += 8; |
195 | 195 | _scumm->VAR(_scumm->VAR_MUSIC_TIMER) = 0; |
196 | 196 | playCDTrack(ptr[16], ptr[17] == 0xff ? -1 : ptr[17], |
… |
… |
|
202 | 202 | // Support for SFX in Monkey Island 1, Mac version |
203 | 203 | // This is rather hackish right now, but works OK. SFX are not sounding |
204 | 204 | // 100% correct, though, not sure right now what is causing this. |
205 | | else if (READ_UINT32_UNALIGNED(ptr) == MKID('Mac1')) { |
| 205 | else if (READ_UINT32(ptr) == MKID('Mac1')) { |
206 | 206 | |
207 | 207 | // Read info from the header |
208 | | size = READ_BE_UINT32_UNALIGNED(ptr+0x60); |
209 | | rate = READ_BE_UINT32_UNALIGNED(ptr+0x64) >> 16; |
| 208 | size = READ_BE_UINT32(ptr+0x60); |
| 209 | rate = READ_BE_UINT32(ptr+0x64) >> 16; |
210 | 210 | |
211 | 211 | // Skip over the header (fixed size) |
212 | 212 | ptr += 0x72; |
… |
… |
|
218 | 218 | return; |
219 | 219 | } |
220 | 220 | // Support for Putt-Putt sounds - very hackish, too 8-) |
221 | | else if (READ_UINT32_UNALIGNED(ptr) == MKID('DIGI')) { |
| 221 | else if (READ_UINT32(ptr) == MKID('DIGI')) { |
222 | 222 | // TODO - discover what data the first chunk, HSHD, contains |
223 | 223 | // it might be useful here. |
224 | | ptr += 8 + READ_BE_UINT32_UNALIGNED(ptr+12); |
225 | | if (READ_UINT32_UNALIGNED(ptr) != MKID('SDAT')) |
| 224 | ptr += 8 + READ_BE_UINT32(ptr+12); |
| 225 | if (READ_UINT32(ptr) != MKID('SDAT')) |
226 | 226 | return; // abort |
227 | 227 | |
228 | | size = READ_BE_UINT32_UNALIGNED(ptr+4) - 8; |
| 228 | size = READ_BE_UINT32(ptr+4) - 8; |
229 | 229 | // FIXME - what value here ?!? 11025 is just a guess based on strings in w32 bin, prev guess 8000 |
230 | 230 | rate = 11025; |
231 | 231 | |
… |
… |
|
236 | 236 | return; |
237 | 237 | } |
238 | 238 | // XMIDI |
239 | | else if ((READ_UINT32_UNALIGNED(ptr) == MKID('MIDI')) && (_scumm->_features & GF_HUMONGOUS)) { |
| 239 | else if ((READ_UINT32(ptr) == MKID('MIDI')) && (_scumm->_features & GF_HUMONGOUS)) { |
240 | 240 | // Pass XMIDI on to IMuse unprocessed. |
241 | 241 | // IMuse can handle XMIDI resources now. |
242 | 242 | } |
243 | | else if (READ_UINT32_UNALIGNED(ptr) == MKID('ADL ')) { |
| 243 | else if (READ_UINT32(ptr) == MKID('ADL ')) { |
244 | 244 | // played as MIDI, just to make perhaps the later use |
245 | 245 | // of WA possible (see "else if" with GF_OLD256 below) |
246 | 246 | } |
247 | 247 | // Support for sampled sound effects in Monkey1 and Monkey2 |
248 | | else if (READ_UINT32_UNALIGNED(ptr) == MKID('SBL ')) { |
| 248 | else if (READ_UINT32(ptr) == MKID('SBL ')) { |
249 | 249 | debug(2, "Using SBL sound effect"); |
250 | 250 | |
251 | 251 | // TODO - Figuring out how the SBL chunk works. Here's |
… |
… |
|
283 | 283 | // I'm going to assume that the sample frequency is |
284 | 284 | // the only important difference between the two. |
285 | 285 | |
286 | | if (READ_UINT32_UNALIGNED(ptr + 8) == MKID('WVhd')) |
| 286 | if (READ_UINT32(ptr + 8) == MKID('WVhd')) |
287 | 287 | rate = 11025; |
288 | 288 | else |
289 | 289 | rate = 8000; |
290 | 290 | |
291 | | size = READ_BE_UINT32_UNALIGNED(ptr + 4) - 27; |
| 291 | size = READ_BE_UINT32(ptr + 4) - 27; |
292 | 292 | |
293 | 293 | // Allocate a sound buffer, copy the data into it, and play |
294 | 294 | sound = (char *)malloc(size); |
diff -ur ScummVM+orig/scummvm/scumm/verbs.cpp ScummVM+hack/scummvm/scumm/verbs.cpp
old
|
new
|
|
558 | 558 | } |
559 | 559 | } else { |
560 | 560 | findObjectInRoom(&foir, foImageHeader, object, room); |
561 | | size = READ_BE_UINT32_UNALIGNED(foir.obim + 4); |
| 561 | size = READ_BE_UINT32(foir.obim + 4); |
562 | 562 | createResource(rtVerb, verb, size); |
563 | 563 | obimptr = getResourceAddress(rtRoom, room) - foir.roomptr + foir.obim; |
564 | 564 | memcpy(getResourceAddress(rtVerb, verb), obimptr, size); |
diff -ur ScummVM+orig/scummvm/simon/charset.cpp ScummVM+hack/scummvm/simon/charset.cpp
old
|
new
|
|
79 | 79 | |
80 | 80 | *(uint16 *)(p + 4) = TO_BE_16(height); |
81 | 81 | *(uint16 *)(p + 6) = TO_BE_16(width); |
82 | | dst += READ_BE_UINT32_UNALIGNED(p); |
| 82 | dst += READ_BE_UINT32(p); |
83 | 83 | |
84 | 84 | memset(dst, 0, count); |
85 | 85 | |
diff -ur ScummVM+orig/scummvm/simon/debug.cpp ScummVM+hack/scummvm/simon/debug.cpp
old
|
new
|
|
175 | 175 | |
176 | 176 | do { |
177 | 177 | if (!(_game & GF_SIMON2)) { |
178 | | opcode = READ_BE_UINT16_UNALIGNED(src); |
| 178 | opcode = READ_BE_UINT16(src); |
179 | 179 | src += 2; |
180 | 180 | } else { |
181 | 181 | opcode = *src++; |
… |
… |
|
205 | 205 | fprintf(_dump_file, "%d ", *src++); |
206 | 206 | break; |
207 | 207 | case 'd': |
208 | | fprintf(_dump_file, "%d ", READ_BE_UINT16_UNALIGNED(src)); |
| 208 | fprintf(_dump_file, "%d ", READ_BE_UINT16(src)); |
209 | 209 | src += 2; |
210 | 210 | break; |
211 | 211 | case 'v': |
212 | | fprintf(_dump_file, "[%d] ", READ_BE_UINT16_UNALIGNED(src)); |
| 212 | fprintf(_dump_file, "[%d] ", READ_BE_UINT16(src)); |
213 | 213 | src += 2; |
214 | 214 | break; |
215 | 215 | case 'i': |
216 | | fprintf(_dump_file, "%d ", (int16)READ_BE_UINT16_UNALIGNED(src)); |
| 216 | fprintf(_dump_file, "%d ", (int16)READ_BE_UINT16(src)); |
217 | 217 | src += 2; |
218 | 218 | break; |
219 | 219 | case 'q': |
220 | | while (READ_BE_UINT16_UNALIGNED(src) != 999) { |
221 | | fprintf(_dump_file, "(%d,%d) ", READ_BE_UINT16_UNALIGNED(src), |
222 | | READ_BE_UINT16_UNALIGNED(src + 2)); |
| 220 | while (READ_BE_UINT16(src) != 999) { |
| 221 | fprintf(_dump_file, "(%d,%d) ", READ_BE_UINT16(src), |
| 222 | READ_BE_UINT16(src + 2)); |
223 | 223 | src += 4; |
224 | 224 | } |
225 | 225 | src++; |
… |
… |
|
240 | 240 | int count; |
241 | 241 | |
242 | 242 | pp = vga; |
243 | | p = pp + READ_BE_UINT16_UNALIGNED(&((VgaFile1Header *) pp)->hdr2_start); |
244 | | count = READ_BE_UINT16_UNALIGNED(&((VgaFile1Header2 *) p)->id_count); |
245 | | p = pp + READ_BE_UINT16_UNALIGNED(&((VgaFile1Header2 *) p)->id_table); |
| 243 | p = pp + READ_BE_UINT16(&((VgaFile1Header *) pp)->hdr2_start); |
| 244 | count = READ_BE_UINT16(&((VgaFile1Header2 *) p)->id_count); |
| 245 | p = pp + READ_BE_UINT16(&((VgaFile1Header2 *) p)->id_table); |
246 | 246 | while (--count >= 0) { |
247 | | int id = READ_BE_UINT16_UNALIGNED(&((VgaFile1Struct0x6 *) p)->id); |
| 247 | int id = READ_BE_UINT16(&((VgaFile1Struct0x6 *) p)->id); |
248 | 248 | |
249 | | dump_vga_script_always(vga + READ_BE_UINT16_UNALIGNED(&((VgaFile1Struct0x6 *) p)->script_offs), id / 100, id); |
| 249 | dump_vga_script_always(vga + READ_BE_UINT16(&((VgaFile1Struct0x6 *) p)->script_offs), id / 100, id); |
250 | 250 | p += sizeof(VgaFile1Struct0x6); |
251 | 251 | } |
252 | 252 | } |
… |
… |
|
256 | 256 | int c; |
257 | 257 | |
258 | 258 | bb = vga; |
259 | | b = bb + READ_BE_UINT16_UNALIGNED(&((VgaFile1Header *) bb)->hdr2_start); |
260 | | c = READ_BE_UINT16_UNALIGNED(&((VgaFile1Header2 *) b)->unk1); |
261 | | b = bb + READ_BE_UINT16_UNALIGNED(&((VgaFile1Header2 *) b)->unk2_offs); |
| 259 | b = bb + READ_BE_UINT16(&((VgaFile1Header *) bb)->hdr2_start); |
| 260 | c = READ_BE_UINT16(&((VgaFile1Header2 *) b)->unk1); |
| 261 | b = bb + READ_BE_UINT16(&((VgaFile1Header2 *) b)->unk2_offs); |
262 | 262 | |
263 | 263 | while (--c >= 0) { |
264 | | int id = READ_BE_UINT16_UNALIGNED(&((VgaFile1Struct0x8 *) b)->id); |
| 264 | int id = READ_BE_UINT16(&((VgaFile1Struct0x8 *) b)->id); |
265 | 265 | |
266 | | dump_vga_script_always(vga + READ_BE_UINT16_UNALIGNED(&((VgaFile1Struct0x8 *) b)->script_offs), id / 100, id); |
| 266 | dump_vga_script_always(vga + READ_BE_UINT16(&((VgaFile1Struct0x8 *) b)->script_offs), id / 100, id); |
267 | 267 | b += sizeof(VgaFile1Struct0x8); |
268 | 268 | } |
269 | 269 | } |
diff -ur ScummVM+orig/scummvm/simon/simon.cpp ScummVM+hack/scummvm/simon/simon.cpp
old
|
new
|
|
2248 | 2248 | // ensure flipping complete |
2249 | 2249 | |
2250 | 2250 | bb = _cur_vga_file_1; |
2251 | | b = bb + READ_BE_UINT16_UNALIGNED(&((VgaFile1Header *) bb)->hdr2_start); |
2252 | | c = READ_BE_UINT16_UNALIGNED(&((VgaFile1Header2 *) b)->unk1); |
2253 | | b = bb + READ_BE_UINT16_UNALIGNED(&((VgaFile1Header2 *) b)->unk2_offs); |
| 2251 | b = bb + READ_BE_UINT16(&((VgaFile1Header *) bb)->hdr2_start); |
| 2252 | c = READ_BE_UINT16(&((VgaFile1Header2 *) b)->unk1); |
| 2253 | b = bb + READ_BE_UINT16(&((VgaFile1Header2 *) b)->unk2_offs); |
2254 | 2254 | |
2255 | | while (READ_BE_UINT16_UNALIGNED(&((VgaFile1Struct0x8 *) b)->id) != vga_res_id) |
| 2255 | while (READ_BE_UINT16(&((VgaFile1Struct0x8 *) b)->id) != vga_res_id) |
2256 | 2256 | b += sizeof(VgaFile1Struct0x8); |
2257 | 2257 | |
2258 | 2258 | if (!(_game & GF_SIMON2)) { |
… |
… |
|
2272 | 2272 | |
2273 | 2273 | vc_ptr_org = _vc_ptr; |
2274 | 2274 | |
2275 | | _vc_ptr = _cur_vga_file_1 + READ_BE_UINT16_UNALIGNED(&((VgaFile1Struct0x8 *) b)->script_offs); |
| 2275 | _vc_ptr = _cur_vga_file_1 + READ_BE_UINT16(&((VgaFile1Struct0x8 *) b)->script_offs); |
2276 | 2276 | //dump_vga_script(_vc_ptr, num, vga_res_id); |
2277 | 2277 | run_vga_script(); |
2278 | 2278 | _vc_ptr = vc_ptr_org; |
… |
… |
|
2795 | 2795 | _video_palette_mode = vsp->unk6; |
2796 | 2796 | _vga_cur_sprite_id = vsp->id; |
2797 | 2797 | |
2798 | | params[0] = READ_BE_UINT16_UNALIGNED(&vsp->image); |
2799 | | params[1] = READ_BE_UINT16_UNALIGNED(&vsp->base_color); |
2800 | | params[2] = READ_BE_UINT16_UNALIGNED(&vsp->x); |
2801 | | params[3] = READ_BE_UINT16_UNALIGNED(&vsp->y); |
| 2798 | params[0] = READ_BE_UINT16(&vsp->image); |
| 2799 | params[1] = READ_BE_UINT16(&vsp->base_color); |
| 2800 | params[2] = READ_BE_UINT16(&vsp->x); |
| 2801 | params[3] = READ_BE_UINT16(&vsp->y); |
2802 | 2802 | |
2803 | 2803 | if (_game & GF_SIMON2) { |
2804 | 2804 | *(byte *)(¶ms[4]) = (byte)vsp->unk4; |
2805 | 2805 | } else { |
2806 | | params[4] = READ_BE_UINT16_UNALIGNED(&vsp->unk4); |
| 2806 | params[4] = READ_BE_UINT16(&vsp->unk4); |
2807 | 2807 | } |
2808 | 2808 | |
2809 | 2809 | _vc_ptr = (byte *)params; |
… |
… |
|
2837 | 2837 | } |
2838 | 2838 | |
2839 | 2839 | src = _vga_var7 + x * 4; |
2840 | | decodeStripA(dst, src + READ_BE_UINT32_UNALIGNED(&*((uint32 *)src)), _vga_var5); |
| 2840 | decodeStripA(dst, src + READ_BE_UINT32(&*((uint32 *)src)), _vga_var5); |
2841 | 2841 | |
2842 | 2842 | dx_unlock_2(); |
2843 | 2843 | |
… |
… |
|
2875 | 2875 | if (vsp->image) |
2876 | 2876 | fprintf(_dump_file, "id:%5d image:%3d base-color:%3d x:%3d y:%3d flags:%x\n", |
2877 | 2877 | vsp->id, vsp->image, vsp->base_color, vsp->x, vsp->y, vsp->unk4); |
2878 | | params[0] = READ_BE_UINT16_UNALIGNED(&vsp->image); |
2879 | | params[1] = READ_BE_UINT16_UNALIGNED(&vsp->base_color); |
2880 | | params[2] = READ_BE_UINT16_UNALIGNED(&vsp->x); |
2881 | | params[3] = READ_BE_UINT16_UNALIGNED(&vsp->y); |
2882 | | params[4] = READ_BE_UINT16_UNALIGNED(&vsp->unk4); |
| 2878 | params[0] = READ_BE_UINT16(&vsp->image); |
| 2879 | params[1] = READ_BE_UINT16(&vsp->base_color); |
| 2880 | params[2] = READ_BE_UINT16(&vsp->x); |
| 2881 | params[3] = READ_BE_UINT16(&vsp->y); |
| 2882 | params[4] = READ_BE_UINT16(&vsp->unk4); |
2883 | 2883 | _vc_ptr = (byte *)params; |
2884 | 2884 | vc_10_draw(); |
2885 | 2885 | |
… |
… |
|
3108 | 3108 | p = (uint16 *)_pathfind_array[20 - i]; |
3109 | 3109 | if (!p) |
3110 | 3110 | continue; |
3111 | | for (j = 0; READ_BE_UINT16_UNALIGNED(&p[0]) != 999; j++, p += 2) { // 0xE703 = byteswapped 999 |
3112 | | x_diff = abs((int)(READ_BE_UINT16_UNALIGNED(&p[0]) - x)); |
3113 | | y_diff = abs((int)(READ_BE_UINT16_UNALIGNED(&p[1]) - 12 - y)); |
| 3111 | for (j = 0; READ_BE_UINT16(&p[0]) != 999; j++, p += 2) { // 0xE703 = byteswapped 999 |
| 3112 | x_diff = abs((int)(READ_BE_UINT16(&p[0]) - x)); |
| 3113 | y_diff = abs((int)(READ_BE_UINT16(&p[1]) - 12 - y)); |
3114 | 3114 | |
3115 | 3115 | if (x_diff < y_diff) { |
3116 | 3116 | x_diff >>= 2; |
… |
… |
|
3714 | 3714 | } |
3715 | 3715 | |
3716 | 3716 | pp = _cur_vga_file_1; |
3717 | | p = pp + READ_BE_UINT16_UNALIGNED(&((VgaFile1Header *) pp)->hdr2_start); |
| 3717 | p = pp + READ_BE_UINT16(&((VgaFile1Header *) pp)->hdr2_start); |
3718 | 3718 | |
3719 | | count = READ_BE_UINT16_UNALIGNED(&((VgaFile1Header2 *) p)->id_count); |
3720 | | p = pp + READ_BE_UINT16_UNALIGNED(&((VgaFile1Header2 *) p)->id_table); |
| 3719 | count = READ_BE_UINT16(&((VgaFile1Header2 *) p)->id_count); |
| 3720 | p = pp + READ_BE_UINT16(&((VgaFile1Header2 *) p)->id_table); |
3721 | 3721 | |
3722 | 3722 | for (;;) { |
3723 | | if (READ_BE_UINT16_UNALIGNED(&((VgaFile1Struct0x6 *) p)->id) == vga_struct_id) { |
| 3723 | if (READ_BE_UINT16(&((VgaFile1Struct0x6 *) p)->id) == vga_struct_id) { |
3724 | 3724 | |
3725 | | //dump_vga_script(pp + READ_BE_UINT16_UNALIGNED(&((VgaFile1Struct0x6*)p)->script_offs), vga_res, vga_struct_id); |
| 3725 | //dump_vga_script(pp + READ_BE_UINT16(&((VgaFile1Struct0x6*)p)->script_offs), vga_res, vga_struct_id); |
3726 | 3726 | |
3727 | | add_vga_timer(gss->VGA_DELAY_BASE, pp + READ_BE_UINT16_UNALIGNED(&((VgaFile1Struct0x6 *) p)->script_offs), vga_struct_id, vga_res); |
| 3727 | add_vga_timer(gss->VGA_DELAY_BASE, pp + READ_BE_UINT16(&((VgaFile1Struct0x6 *) p)->script_offs), vga_struct_id, vga_res); |
3728 | 3728 | break; |
3729 | 3729 | } |
3730 | 3730 | p += sizeof(VgaFile1Struct0x6); |
diff -ur ScummVM+orig/scummvm/simon/vga.cpp ScummVM+hack/scummvm/simon/vga.cpp
old
|
new
|
|
120 | 120 | } |
121 | 121 | |
122 | 122 | if (!(_game & GF_SIMON2)) { |
123 | | opcode = READ_BE_UINT16_UNALIGNED(_vc_ptr); |
| 123 | opcode = READ_BE_UINT16(_vc_ptr); |
124 | 124 | _vc_ptr += 2; |
125 | 125 | } else { |
126 | 126 | opcode = *_vc_ptr++; |
… |
… |
|
144 | 144 | } |
145 | 145 | |
146 | 146 | uint SimonEngine::vc_read_next_word() { |
147 | | uint a = READ_BE_UINT16_UNALIGNED(_vc_ptr); |
| 147 | uint a = READ_BE_UINT16(_vc_ptr); |
148 | 148 | _vc_ptr += 2; |
149 | 149 | return a; |
150 | 150 | } |
… |
… |
|
245 | 245 | |
246 | 246 | |
247 | 247 | bb = _cur_vga_file_1; |
248 | | b = bb + READ_BE_UINT16_UNALIGNED(&((VgaFile1Header *) bb)->hdr2_start); |
249 | | b = bb + READ_BE_UINT16_UNALIGNED(&((VgaFile1Header2 *) b)->unk2_offs); |
| 248 | b = bb + READ_BE_UINT16(&((VgaFile1Header *) bb)->hdr2_start); |
| 249 | b = bb + READ_BE_UINT16(&((VgaFile1Header2 *) b)->unk2_offs); |
250 | 250 | |
251 | | while (READ_BE_UINT16_UNALIGNED(&((VgaFile1Struct0x8 *) b)->id) != num) |
| 251 | while (READ_BE_UINT16(&((VgaFile1Struct0x8 *) b)->id) != num) |
252 | 252 | b += sizeof(VgaFile1Struct0x8); |
253 | 253 | |
254 | 254 | vc_ptr_org = _vc_ptr; |
255 | 255 | |
256 | | _vc_ptr = _cur_vga_file_1 + READ_BE_UINT16_UNALIGNED(&((VgaFile1Struct0x8 *) b)->script_offs); |
| 256 | _vc_ptr = _cur_vga_file_1 + READ_BE_UINT16(&((VgaFile1Struct0x8 *) b)->script_offs); |
257 | 257 | |
258 | 258 | //dump_vga_script(_vc_ptr, res, num); |
259 | 259 | run_vga_script(); |
… |
… |
|
317 | 317 | } |
318 | 318 | |
319 | 319 | pp = _cur_vga_file_1; |
320 | | p = pp + READ_BE_UINT16_UNALIGNED(&((VgaFile1Header *) pp)->hdr2_start); |
321 | | p = pp + READ_BE_UINT16_UNALIGNED(&((VgaFile1Header2 *) p)->id_table); |
| 320 | p = pp + READ_BE_UINT16(&((VgaFile1Header *) pp)->hdr2_start); |
| 321 | p = pp + READ_BE_UINT16(&((VgaFile1Header2 *) p)->id_table); |
322 | 322 | |
323 | | while (READ_BE_UINT16_UNALIGNED(&((VgaFile1Struct0x6 *) p)->id) != b) |
| 323 | while (READ_BE_UINT16(&((VgaFile1Struct0x6 *) p)->id) != b) |
324 | 324 | p += sizeof(VgaFile1Struct0x6); |
325 | 325 | |
326 | 326 | #ifdef DUMP_FILE_NR |
… |
… |
|
343 | 343 | } |
344 | 344 | #endif |
345 | 345 | |
346 | | //dump_vga_script(_cur_vga_file_1 + READ_BE_UINT16_UNALIGNED(&((VgaFile1Struct0x6*)p)->script_offs), res, b); |
| 346 | //dump_vga_script(_cur_vga_file_1 + READ_BE_UINT16(&((VgaFile1Struct0x6*)p)->script_offs), res, b); |
347 | 347 | |
348 | | add_vga_timer(gss->VGA_DELAY_BASE, _cur_vga_file_1 + READ_BE_UINT16_UNALIGNED(&((VgaFile1Struct0x6 *) p)->script_offs), b, res); |
| 348 | add_vga_timer(gss->VGA_DELAY_BASE, _cur_vga_file_1 + READ_BE_UINT16(&((VgaFile1Struct0x6 *) p)->script_offs), b, res); |
349 | 349 | } |
350 | 350 | |
351 | 351 | void SimonEngine::vc_4_dummy_op() { |
… |
… |
|
599 | 599 | state.image = vc_read_var(-state.image); |
600 | 600 | |
601 | 601 | p2 = _cur_vga_file_2 + state.image * 8; |
602 | | state.depack_src = _cur_vga_file_2 + READ_BE_UINT32_UNALIGNED(&*(uint32 *)p2); |
| 602 | state.depack_src = _cur_vga_file_2 + READ_BE_UINT32(&*(uint32 *)p2); |
603 | 603 | |
604 | | width = READ_BE_UINT16_UNALIGNED(p2 + 6) >> 4; |
| 604 | width = READ_BE_UINT16(p2 + 6) >> 4; |
605 | 605 | height = p2[5]; |
606 | 606 | flags = p2[4]; |
607 | 607 | |
… |
… |
|
640 | 640 | src = state.depack_src + _x_scroll * 4; |
641 | 641 | |
642 | 642 | for (w = 0; w < 40; w++) { |
643 | | decodeStripA(dst, src + READ_BE_UINT32_UNALIGNED(&*(uint32 *)src), height); |
| 643 | decodeStripA(dst, src + READ_BE_UINT32(&*(uint32 *)src), height); |
644 | 644 | dst += 8; |
645 | 645 | src += 4; |
646 | 646 | } |
… |
… |
|
1031 | 1031 | void SimonEngine::vc_17_set_pathfind_item() { |
1032 | 1032 | uint a = vc_read_next_word(); |
1033 | 1033 | _pathfind_array[a - 1] = (uint16 *)_vc_ptr; |
1034 | | while (READ_BE_UINT16_UNALIGNED(_vc_ptr) != 999) |
| 1034 | while (READ_BE_UINT16(_vc_ptr) != 999) |
1035 | 1035 | _vc_ptr += 4; |
1036 | 1036 | _vc_ptr += 2; |
1037 | 1037 | } |
… |
… |
|
1483 | 1483 | vp = &_variableArray[20]; |
1484 | 1484 | |
1485 | 1485 | do { |
1486 | | y2 = READ_BE_UINT16_UNALIGNED(p); |
| 1486 | y2 = READ_BE_UINT16(p); |
1487 | 1487 | p += step; |
1488 | | y1 = READ_BE_UINT16_UNALIGNED(p) - y2; |
| 1488 | y1 = READ_BE_UINT16(p) - y2; |
1489 | 1489 | |
1490 | 1490 | vp[0] = y1 >> 1; |
1491 | 1491 | vp[1] = y1 - (y1 >> 1); |
… |
… |
|
1738 | 1738 | _cur_vga_file_2 = vpe->vgaFile2; |
1739 | 1739 | _video_palette_mode = vsp->unk6; |
1740 | 1740 | |
1741 | | params[0] = READ_BE_UINT16_UNALIGNED(&vsp->image); |
1742 | | params[1] = READ_BE_UINT16_UNALIGNED(&vsp->base_color); |
1743 | | params[2] = READ_BE_UINT16_UNALIGNED(&vsp->x); |
1744 | | params[3] = READ_BE_UINT16_UNALIGNED(&vsp->y); |
1745 | | params[4] = READ_BE_UINT16_UNALIGNED(&vsp->unk4); |
| 1741 | params[0] = READ_BE_UINT16(&vsp->image); |
| 1742 | params[1] = READ_BE_UINT16(&vsp->base_color); |
| 1743 | params[2] = READ_BE_UINT16(&vsp->x); |
| 1744 | params[3] = READ_BE_UINT16(&vsp->y); |
| 1745 | params[4] = READ_BE_UINT16(&vsp->unk4); |
1746 | 1746 | _vc_ptr = (byte *)params; |
1747 | 1747 | vc_10_draw(); |
1748 | 1748 | |