KAZIK/src_graphics/russian_table.inc
Artvasil09 881a0061dc Add native NPC visitors with contracts, Clover slots, Pyramid, and party table scenes
Implement 32x32 BFS visitor navigation and daily contracts system with companion .npc journals; add native assembly scenes for Clover slots, Pyramid cards, Blackjack Party and Russian Party; package animation and sprite packs; add comprehensive offline test suites and rebuild shipping binaries.
2026-10-13 09:47:33 +03:00

209 lines
5.4 KiB
PHP

; One first-person table/camera shared in style with Buckshot, with revolver-only poses.
.code
RenderRussianTable3D PROC uses ebx esi edi
local pose:DWORD,angle:DWORD
mov animOpacity3D,255
cmp rr3d_room.pixels,0
je rr_table_missing
mov esi,rr3d_room.pixels
lea edi,screenBuffer
mov ecx,SCREEN_SIZE
rep movsd
cmp rrPartyCount3D,1
jbe rr_table_original_dealer
call RenderRRPartyCharacters3D
jmp rr_table_actions
rr_table_original_dealer:
mov eax,0
cmp rr3d_turn,1
jne @F
cmp rr3d_state,RR_RAISE
je rr_table_dealer_active
cmp rr3d_state,RR_FIRE
je rr_table_dealer_active
cmp rr3d_state,RR_DRY
jne @F
rr_table_dealer_active:
mov eax,2
@@:
invoke DrawAnimSprite3D,OFFSET rr3d_dealer,eax,192,2,256,224
rr_table_actions:
mov eax,rr3d_state
cmp eax,RR_LOAD
je rr_table_load
cmp eax,RR_SPIN
je rr_table_spin
cmp eax,RR_RAISE
je rr_table_raise
cmp eax,RR_FIRE
je rr_table_fire
cmp eax,RR_DRY
je rr_table_dry
cmp eax,RR_GLITCH
je rr_table_glitch
invoke DrawRouletteSprite3D,0,160,151,156,82,0
jmp rr_table_hud
rr_table_load:
mov eax,rr3d_timer
xor edx,edx
mov ecx,450
div ecx
cmp eax,rr3d_bullets
jae rr_table_close_cylinder
mov eax,edx
xor edx,edx
mov ecx,150
div ecx
inc eax
cmp rr3d_timer,150
jae rr_table_load_draw
xor eax,eax
jmp rr_table_load_draw
rr_table_close_cylinder:
mov eax,6
cmp rr3d_timer,1600
jb rr_table_load_draw
inc eax
rr_table_load_draw:
invoke DrawAnimSprite3D,OFFSET rr3d_hands,eax,140,144,384,256
jmp rr_table_hud
rr_table_spin:
mov eax,1400
sub eax,rr3d_timer
imul eax,eax
shl eax,1
xor edx,edx
mov ecx,1400
div ecx
invoke DrawRouletteSprite3D,0,160,151,144,82,eax
jmp rr_table_hud
rr_table_raise:
mov eax,rr3d_timer
imul eax,128
xor edx,edx
mov ecx,750
div ecx
mov angle,eax
mov pose,4
jmp rr_table_raised
rr_table_fire:
mov pose,4
cmp rr3d_shot,0
je @F
mov pose,5
@@:
mov angle,128
jmp rr_table_raised
rr_table_dry:
mov pose,4
mov angle,128
rr_table_raised:
cmp rrPartyCount3D,1
jbe @F
cmp rr3d_turn,0
je @F
call RenderRRPartyGun3D
jmp rr_table_hud
@@:
cmp rr3d_turn,1
je rr_table_dealer_gun
; Only the player's hands/gun are visible, never a portrait of the player.
invoke DrawRouletteSprite3D,pose,270,137,154,112,angle
jmp rr_table_hud
rr_table_dealer_gun:
; Weapon-only silhouette avoids overlaying a second pair of arms on the dealer.
invoke DrawRouletteSprite3D,0,204,59,80,51,0
jmp rr_table_hud
rr_table_glitch:
invoke RenderRussianGlitch3D,190
ret
rr_table_hud:
invoke DrawBuckshotPanel3D,0,0,640,32,00111116h
invoke DrawBuckshotText3D,14,12,OFFSET rrTitleText3D,00E9C47Ah
invoke DrawBuckshotText3D,360,12,OFFSET bs3d_textBank,00BCBCBCh
invoke DrawBuckshotNumber3D,412,12,bankroll,00F3E4BAh
invoke DrawBuckshotPanel3D,0,400,640,80,00111617h
invoke DrawBuckshotText3D,16,414,OFFSET rrCartridgeText3D,00EBD5A0h
mov ebx,rr3d_bullets
cmp rrPartyCount3D,1
jbe @F
cmp rr3d_state,RR_READY
je @F
xor ebx,ebx
mov edx,rr3d_mask
rr_table_remaining_rounds:
shr edx,1
adc ebx,0
test edx,edx
jnz rr_table_remaining_rounds
@@:
invoke DrawBuckshotNumber3D,160,414,ebx,00FFFFFFh
invoke DrawBuckshotText3D,456,414,OFFSET bs3d_textBet,00EBD5A0h
mov eax,rrPartyStake3D
cmp rr3d_state,RR_READY
je rr_table_selected_stake
test eax,eax
jnz rr_table_stake
rr_table_selected_stake:
mov eax,rr3d_bet
rr_table_stake:
invoke DrawBuckshotNumber3D,528,414,eax,00FFFFFFh
mov ebx,OFFSET rrPlayerText3D
cmp rr3d_turn,0
je @F
mov ebx,OFFSET rrDealerText3D
cmp rrPartyCount3D,1
jbe @F
mov eax,rr3d_turn
dec eax
cmp eax,3
jae @F
mov ebx,rrPartyNames3D[eax*4]
@@:
cmp rr3d_state,RR_LOAD
jne @F
mov ebx,OFFSET rrLoadText3D
@@:
cmp rr3d_state,RR_SPIN
jne @F
mov ebx,OFFSET rrSpinText3D
@@:
cmp rr3d_state,RR_DRY
jne @F
mov ebx,OFFSET rrClickText3D
@@:
cmp rr3d_state,RR_READY
je @F
invoke DrawBuckshotText3D,16,440,ebx,00E9C47Ah
@@:
cmp rr3d_state,RR_READY
jne rr_table_not_ready
invoke DrawBuckshotText3D,16,440,OFFSET rrBulletKeys3D,00EBD5A0h
invoke DrawBuckshotText3D,360,440,OFFSET rrBetKeys3D,00EBD5A0h
invoke DrawBuckshotText3D,16,462,OFFSET rrStartText3D,00FFFFFFh
cmp rr3d_error,0
je rr_table_exit_hint
invoke DrawBuckshotPanel3D,200,342,240,24,002B1616h
invoke DrawBuckshotText3D,208,350,OFFSET rrEmptyBank3D,00DD7768h
jmp rr_table_exit_hint
rr_table_not_ready:
cmp rr3d_state,RR_PLAYER
jne @F
invoke DrawBuckshotText3D,16,462,OFFSET rrFireText3D,00FFFFFFh
@@:
cmp rr3d_state,RR_WIN
jne rr_table_exit_hint
invoke DrawBuckshotPanel3D,0,434,640,46,00111617h
invoke DrawBuckshotText3D,16,440,OFFSET rrVictoryText3D,007FE395h
invoke DrawBuckshotNumber3D,184,440,rr3d_payout,007FE395h
invoke DrawBuckshotText3D,16,462,OFFSET rrRoundText3D,00FFFFFFh
rr_table_exit_hint:
mov ebx,OFFSET bs3d_textExit
invoke DrawBuckshotText3D,530,462,ebx,00AFAFAFh
call RenderRRPartyControls3D
ret
rr_table_missing:
invoke DrawBuckshotPanel3D,0,0,640,480,00111719h
invoke DrawBuckshotText3D,184,230,OFFSET bs3d_textAssets,00E1C67Bh
ret
RenderRussianTable3D ENDP