- Native player-controlled stairs, upper lounge bar, and Hell Tower infernal portal - Cabaret stage with musical acts, audience seating, and interaction - Dedicated cash/trophy wall terminals with native balance and achievement screens - Projecting 3D wall lanterns with ray/plane intersection - Six roaming guests with seated poses and card rank rendering updates - Synchronized launcher hash and updated binaries
188 lines
4.6 KiB
PHP
188 lines
4.6 KiB
PHP
UpdateCabaret3D PROC
|
|
mov eax,deltaTime3D
|
|
add eax,cabaretTime3D
|
|
xor edx,edx
|
|
mov ecx,90000
|
|
div ecx
|
|
mov cabaretTime3D,edx
|
|
mov eax,edx
|
|
xor edx,edx
|
|
mov ecx,30000
|
|
div ecx
|
|
mov cabaretAct3D,eax
|
|
ret
|
|
UpdateCabaret3D ENDP
|
|
|
|
BeginCabaret3D PROC
|
|
mov engineMode,MODE_CABARET
|
|
mov mouseClick3D,0
|
|
call ClearKeys3D
|
|
ret
|
|
BeginCabaret3D ENDP
|
|
|
|
HandleCabaret3D PROC
|
|
call UpdateCabaret3D
|
|
cmp mouseClick3D,0
|
|
je cabaret_handle_keys
|
|
cmp mouseY3D,210
|
|
jb cabaret_handle_keys
|
|
cmp mouseX3D,236
|
|
jae cabaret_leave
|
|
cmp mouseX3D,148
|
|
jae cabaret_tip
|
|
cmp bankroll,100
|
|
jb cabaret_handled
|
|
sub bankroll,100
|
|
mov eax,cabaretAct3D
|
|
inc eax
|
|
cmp eax,3
|
|
jb @F
|
|
xor eax,eax
|
|
@@:
|
|
imul eax,30000
|
|
mov cabaretTime3D,eax
|
|
call SaveProgress3D
|
|
jmp cabaret_handled
|
|
cabaret_tip:
|
|
cmp bankroll,100
|
|
jb cabaret_handled
|
|
sub bankroll,100
|
|
invoke CopyString3D,OFFSET cabaretApplause3D,OFFSET flashMessage
|
|
mov flashTimer,120
|
|
call SaveProgress3D
|
|
jmp cabaret_handled
|
|
cabaret_handle_keys:
|
|
invoke Pressed3D,45h
|
|
test eax,eax
|
|
jnz cabaret_leave
|
|
jmp cabaret_handled
|
|
cabaret_leave:
|
|
mov engineMode,MODE_WALK
|
|
call ClearKeys3D
|
|
cabaret_handled:
|
|
mov mouseClick3D,0
|
|
ret
|
|
HandleCabaret3D ENDP
|
|
|
|
RenderCabaretActors3D PROC uses ebx esi edi
|
|
mov eax,animationClock3D
|
|
xor edx,edx
|
|
mov ecx,200
|
|
div ecx
|
|
xor edx,edx
|
|
mov ecx,12
|
|
div ecx
|
|
mov edi,edx
|
|
cmp cabaretAct3D,1
|
|
je cabaret_jazz
|
|
; Existing dancers retain their complete twelve-frame loop.
|
|
xor esi,esi
|
|
cabaret_dancer:
|
|
mov eax,edi
|
|
add eax,esi
|
|
xor edx,edx
|
|
mov ecx,12
|
|
div ecx
|
|
add edx,10
|
|
shl edx,16
|
|
add edx,OFFSET texturesBuffer
|
|
mov hallLegacyPack3D.pixels,edx
|
|
mov cabaretActor3D.asset,OFFSET hallLegacyPack3D
|
|
mov cabaretActor3D.frame,0
|
|
imul eax,esi,3*FP_1
|
|
add eax,13*FP_1
|
|
mov cabaretActor3D.posX,eax
|
|
mov cabaretActor3D.posY,4*FP_1
|
|
invoke DrawCityObject3D,OFFSET cabaretActor3D,0
|
|
inc esi
|
|
cmp cabaretAct3D,2
|
|
je cabaret_singer
|
|
cmp esi,3
|
|
jb cabaret_dancer
|
|
ret
|
|
cabaret_jazz:
|
|
mov eax,edi
|
|
and eax,3
|
|
mov cabaretPiano3D.frame,eax
|
|
invoke DrawCityObject3D,OFFSET cabaretPiano3D,0
|
|
mov eax,edi
|
|
and eax,3
|
|
mov cabaretGuitar3D.frame,eax
|
|
invoke DrawCityObject3D,OFFSET cabaretGuitar3D,0
|
|
mov cabaretActor3D.asset,OFFSET cabaretArt3D
|
|
mov cabaretActor3D.posX,FP_1*187/10
|
|
mov cabaretActor3D.posY,4*FP_1
|
|
mov eax,edi
|
|
and eax,3
|
|
add eax,8
|
|
mov cabaretActor3D.frame,eax
|
|
invoke DrawCityObject3D,OFFSET cabaretActor3D,0
|
|
cabaret_singer:
|
|
mov cabaretActor3D.asset,OFFSET cabaretArt3D
|
|
mov cabaretActor3D.posX,FP_1*162/10
|
|
mov cabaretActor3D.posY,4*FP_1
|
|
mov eax,edi
|
|
and eax,3
|
|
mov cabaretActor3D.frame,eax
|
|
invoke DrawCityObject3D,OFFSET cabaretActor3D,0
|
|
ret
|
|
RenderCabaretActors3D ENDP
|
|
|
|
RenderCabaret3D PROC uses ebx
|
|
local oldEye:DWORD,oldHorizon:DWORD,oldX:DWORD,oldY:DWORD,oldAngle:DWORD
|
|
mov eax,playerX
|
|
mov oldX,eax
|
|
mov eax,playerY
|
|
mov oldY,eax
|
|
mov eax,playerAngle
|
|
mov oldAngle,eax
|
|
mov playerX,16*FP_1
|
|
mov playerY,FP_1*92/10
|
|
mov playerAngle,384
|
|
mov eax,viewEye3D
|
|
mov oldEye,eax
|
|
mov eax,viewHorizon3D
|
|
mov oldHorizon,eax
|
|
mov viewEye3D,FP_1*3/4
|
|
mov viewHorizon3D,HALF_H
|
|
call UpdateCamera3D
|
|
call RenderCeilingAndFloor
|
|
call RenderWalls
|
|
call PrepareCityDepth3D
|
|
call RenderSprites
|
|
call RenderHall3D
|
|
invoke DrawBox,0,0,320,25,0014191Dh
|
|
invoke DrawString8x8,12,8,OFFSET cabaretTitle3D,00E7CA88h
|
|
invoke DrawBox,0,178,320,62,0014191Dh
|
|
mov eax,cabaretAct3D
|
|
invoke DrawString8x8,8,183,cabaretActNames3D[eax*4],00E7CA88h
|
|
invoke DrawString8x8,8,197,OFFSET cabaretNext3D,0098A9AAh
|
|
mov eax,cabaretTime3D
|
|
xor edx,edx
|
|
mov ecx,30000
|
|
div ecx
|
|
mov eax,30000
|
|
sub eax,edx
|
|
xor edx,edx
|
|
mov ecx,1000
|
|
div ecx
|
|
invoke DrawNumber,200,197,eax,00E7CA88h
|
|
invoke DrawBoxBorder,5,212,139,23,00252B29h,00836D42h,1
|
|
invoke DrawBoxBorder,148,212,84,23,00252B29h,00836D42h,1
|
|
invoke DrawBoxBorder,236,212,79,23,00252B29h,00836D42h,1
|
|
invoke DrawString8x8,12,219,OFFSET cabaretRequest3D,00E7CA88h
|
|
invoke DrawString8x8,152,219,OFFSET cabaretTip3D,00E7CA88h
|
|
invoke DrawString8x8,244,219,OFFSET cabaretStand3D,00E7CA88h
|
|
mov eax,oldEye
|
|
mov viewEye3D,eax
|
|
mov eax,oldHorizon
|
|
mov viewHorizon3D,eax
|
|
mov eax,oldX
|
|
mov playerX,eax
|
|
mov eax,oldY
|
|
mov playerY,eax
|
|
mov eax,oldAngle
|
|
mov playerAngle,eax
|
|
call UpdateCamera3D
|
|
ret
|
|
RenderCabaret3D ENDP
|