Fixed vanilla sounds on 32-bit
This commit is contained in:
parent
b66dbe5354
commit
1c3c7b194a
3
Makefile
3
Makefile
|
@ -175,6 +175,9 @@ else
|
|||
EXTRA_CPP_INCLUDES ?=
|
||||
endif
|
||||
|
||||
ifeq ($(TARGET_BITS), 32)
|
||||
DEFINES += BITS_32=1
|
||||
endif
|
||||
|
||||
# VERSION - selects the version of the game to build
|
||||
# jp - builds the 1996 Japanese version
|
||||
|
|
|
@ -91,7 +91,11 @@
|
|||
|
||||
.macro seq_initchannels_extended a
|
||||
.byte 0xc1
|
||||
.ifdef BITS_32
|
||||
.byte 0, 0, 0, 0, (\a >> 24) & 0xff, (\a >> 16) & 0xff, (\a >> 8) & 0xff, \a & 0xff
|
||||
.else
|
||||
.byte (\a >> 56) & 0xff, (\a >> 48) & 0xff, (\a >> 40) & 0xff, (\a >> 32) & 0xff, (\a >> 24) & 0xff, (\a >> 16) & 0xff, (\a >> 8) & 0xff, \a & 0xff
|
||||
.endif
|
||||
.endm
|
||||
|
||||
.macro seq_changevol a
|
||||
|
|
|
@ -18,7 +18,12 @@ seq_setmutescale 0
|
|||
seq_setvol 127
|
||||
.endif
|
||||
seq_settempo 120
|
||||
|
||||
.ifdef BITS_32
|
||||
seq_initchannels_extended 0xb33f
|
||||
.else
|
||||
seq_initchannels_extended 0xffffffffffffffff
|
||||
.endif
|
||||
|
||||
# SOUND_BANK_ACTION
|
||||
seq_startchannel_extended 0, .channel0
|
||||
|
|
|
@ -532,10 +532,11 @@ s32 m64_read_s32(struct M64ScriptState* state) {
|
|||
assert(state != NULL);
|
||||
assert(state->pc != NULL);
|
||||
#endif
|
||||
s32 ret = *(state->pc++) << 24;
|
||||
ret = (*(state->pc++) << 16) | ret;
|
||||
ret = (*(state->pc++) << 8) | ret;
|
||||
ret = *(state->pc++) | ret;
|
||||
s32 ret = 0;
|
||||
ret = (((u32)*(state->pc++) << 24)) | ret;
|
||||
ret = (((u32)*(state->pc++) << 16)) | ret;
|
||||
ret = (((u32)*(state->pc++) << 8)) | ret;
|
||||
ret = (((u32)*(state->pc++) << 0)) | ret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
@ -2750,6 +2751,9 @@ void sequence_player_process_sequence(struct SequencePlayer *seqPlayer) {
|
|||
|
||||
case 0xc1: // seq_initchannels_extended
|
||||
u64v = m64_read_s64(state);
|
||||
#ifdef BITS_32
|
||||
if (u64v == 0xb33f) { u64v = 0xffffffffffffffff; }
|
||||
#endif
|
||||
sequence_player_init_channels_extended(seqPlayer, u64v);
|
||||
break;
|
||||
|
||||
|
|
Loading…
Reference in New Issue