Add native Durak, poker, blackjack, roulette, Buckshot and billiards scenes with animation assets and regression tests. Improve arrival, city, hall, profiles, shops, audio and exit handling; remove the portable C game core and refresh shipping executables.
48 lines
1.2 KiB
PHP
48 lines
1.2 KiB
PHP
; UI ticks yield to gameplay audio; missing files never trigger the Windows default beep.
|
|
.code
|
|
PlayCasinoSound3D PROC uses ebx sound:DWORD,handle:DWORD,flags:DWORD
|
|
mov ebx, sound
|
|
test ebx, ebx
|
|
jz casino_sound_stop
|
|
cmp ebx, OFFSET soundLose
|
|
jne @F
|
|
cmp bankroll, 0
|
|
je @F
|
|
mov ebx, OFFSET soundRoundLose
|
|
@@:
|
|
mov eax, 20003h ; SND_FILENAME | SND_NODEFAULT | SND_ASYNC
|
|
cmp ebx, OFFSET soundClick
|
|
je casino_sound_yield
|
|
cmp ebx, OFFSET soundShuffle
|
|
jne casino_sound_play
|
|
casino_sound_yield:
|
|
or eax, 10h ; SND_NOSTOP: do not cut an ongoing game action for a UI tick.
|
|
casino_sound_play:
|
|
IFDEF CASINO_ACTION_TEST
|
|
mov lastSoundPath3D, ebx
|
|
mov lastSoundFlags3D, eax
|
|
mov eax, 1
|
|
ELSE
|
|
invoke PlaySoundA, ebx, 0, eax
|
|
ENDIF
|
|
ret
|
|
casino_sound_stop:
|
|
IFDEF CASINO_ACTION_TEST
|
|
mov lastSoundPath3D, 0
|
|
mov lastSoundFlags3D, 0
|
|
ELSE
|
|
invoke PlaySoundA, 0, 0, 0
|
|
ENDIF
|
|
ret
|
|
PlayCasinoSound3D ENDP
|
|
|
|
CloseLegacySounds3D PROC uses esi
|
|
xor esi, esi
|
|
close_legacy_sound:
|
|
invoke mciSendStringA, legacySoundClosers3D[esi*4], 0, 0, 0
|
|
inc esi
|
|
cmp esi, legacySoundCount3D
|
|
jb close_legacy_sound
|
|
call StopTowerMusic
|
|
ret
|
|
CloseLegacySounds3D ENDP
|