KAZIK/src_graphics/city_furniture.inc
Artvasil09 3ad5bf4c9d Develop assembly-only casino scenes and native games
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.
2026-10-08 22:39:19 +03:00

97 lines
2.4 KiB
PHP

; Benches are fixed world surfaces, not camera-facing cutouts.
.data
cityBenchCenters3D dd FP_1*151/10,FP_1*45/2
cityBenchMetal3D dd (32*32) dup(0FF24282Dh)
IFDEF CASINO_ACTION_TEST
cityBenchVisible3D dd 0
.data?
cityBenchBefore3D dd SCREEN_SIZE dup(?)
ENDIF
.code
DrawCityBenchBlock3D PROC x0:DWORD,x1:DWORD,y0:DWORD,y1:DWORD,z0:DWORD,z1:DWORD,material:DWORD
invoke DrawCityBoxSides3D,x0,x1,y0,y1,z0,z1,material
invoke DrawCityHorizontal3D,x0,x1,y0,y1,z1,material
ret
DrawCityBenchBlock3D ENDP
DrawCityBench3D PROC uses ebx esi center:DWORD
local loX:DWORD,hiX:DWORD,loY:DWORD,hiY:DWORD
mov eax,center
sub eax,FP_1*19/20
mov loX,eax
add eax,FP_1*19/10
mov hiX,eax
mov loY,FP_1*327/20
xor esi,esi
city_bench_seat:
mov eax,loY
add eax,FP_1*3/20
mov hiY,eax
invoke DrawCityBenchBlock3D,loX,hiX,loY,hiY,FP_1*11/25,FP_HALF,96
add loY,FP_1*9/50
inc esi
cmp esi,3
jb city_bench_seat
invoke DrawCityBenchBlock3D,loX,hiX,FP_1*422/25,FP_1*847/50,FP_1*18/25,FP_1*41/50,96
invoke DrawCityBenchBlock3D,loX,hiX,FP_1*422/25,FP_1*847/50,FP_1*9/10,FP_1,96
xor esi,esi
city_bench_leg:
mov eax,center
sub eax,FP_1*3/4
test esi,1
jz @F
add eax,FP_1*3/2
@@:
sub eax,FP_1/25
mov loX,eax
add eax,FP_1*2/25
mov hiX,eax
mov loY,FP_1*819/50
mov hiY,FP_1*823/50
mov ebx,FP_1*17/25
test esi,2
jz @F
mov loY,FP_1*843/50
mov hiY,FP_1*847/50
mov ebx,FP_1*21/20
@@:
invoke DrawCityBenchBlock3D,loX,hiX,loY,hiY,0,ebx,110
inc esi
cmp esi,4
jb city_bench_leg
mov eax,center
sub eax,FP_1*21/25
mov loX,eax
add eax,FP_1*2/25
mov hiX,eax
invoke DrawCityBenchBlock3D,loX,hiX,FP_1*327/20,FP_1*169/10,FP_1*17/25,FP_1*18/25,110
add loX,FP_1*8/5
add hiX,FP_1*8/5
invoke DrawCityBenchBlock3D,loX,hiX,FP_1*327/20,FP_1*169/10,FP_1*17/25,FP_1*18/25,110
ret
DrawCityBench3D ENDP
RenderCityFurniture3D PROC uses esi edi
IFDEF CASINO_ACTION_TEST
lea esi,screenBuffer
lea edi,cityBenchBefore3D
mov ecx,SCREEN_SIZE
rep movsd
ENDIF
invoke DrawCityBench3D,cityBenchCenters3D
invoke DrawCityBench3D,cityBenchCenters3D[4]
IFDEF CASINO_ACTION_TEST
mov cityBenchVisible3D,0
xor ecx,ecx
city_bench_count:
mov eax,screenBuffer[ecx*4]
cmp eax,cityBenchBefore3D[ecx*4]
je @F
inc cityBenchVisible3D
@@:
inc ecx
cmp ecx,SCREEN_SIZE
jb city_bench_count
ENDIF
ret
RenderCityFurniture3D ENDP