- Add playable ten-frame bowling against bot with two timing gates (direction/power) and fixed-step physics - Add lane match interaction, shaded ball surface, pin collisions, bonus balls, and live score sheet - Scale rooftop terrace visitor sprites to eye level according to the taller rooftop standing eye height - Resolve mode and interaction ID conflicts with Hell FPS (MODE_BOWLING=30, INTERACT_BOWL_PLAY=56) - Update launcher hash, installer package, and expansion regression test suites
73 lines
1.7 KiB
PHP
73 lines
1.7 KiB
PHP
; Interactive fixture: production MASM scene and events, no profile writes.
|
|
.code
|
|
BowlingUiStart PROC
|
|
call InitPaths3D
|
|
call Create3DWindow
|
|
test eax,eax
|
|
jz bp_ui_fail
|
|
invoke SetWindowLongA,h3DWnd,-4,OFFSET WindowEvents3D
|
|
call InitBowling3D
|
|
call LoadBowling3D
|
|
mov hallLevel3D,HALL_BOWLING
|
|
mov worldMap3D,OFFSET bwMap3D
|
|
mov playerX,FP_1*49/10
|
|
mov playerY,25*FP_1
|
|
mov playerAngle,384
|
|
invoke BeginBowlingPlay3D,1
|
|
call RenderBowlingPlay3D
|
|
invoke ShowWindow,h3DWnd,1
|
|
call Present3D
|
|
invoke SetForegroundWindow,h3DWnd
|
|
invoke GetTickCount
|
|
mov previousTick3D,eax
|
|
bp_ui_loop:
|
|
invoke PeekMessageA,OFFSET msg3D,0,0,0,1
|
|
test eax,eax
|
|
jz bp_ui_frame
|
|
cmp DWORD PTR msg3D[4],12h
|
|
je bp_ui_close
|
|
invoke TranslateMessage,OFFSET msg3D
|
|
invoke DispatchMessageA,OFFSET msg3D
|
|
jmp bp_ui_loop
|
|
bp_ui_frame:
|
|
invoke GetTickCount
|
|
mov frameStart3D,eax
|
|
sub eax,previousTick3D
|
|
cmp eax,100
|
|
jbe @F
|
|
mov eax,100
|
|
@@:
|
|
mov deltaTime3D,eax
|
|
mov eax,frameStart3D
|
|
mov previousTick3D,eax
|
|
invoke GetForegroundWindow
|
|
cmp eax,h3DWnd
|
|
jne bp_ui_idle
|
|
invoke Pressed3D,1Bh
|
|
test eax,eax
|
|
jnz bp_ui_close
|
|
mov eax,deltaTime3D
|
|
add animationClock3D,eax
|
|
call HandleBowlingPlay3D
|
|
cmp engineMode,MODE_BOWLING
|
|
jne bp_ui_mode_error
|
|
call RenderBowlingPlay3D
|
|
call Present3D
|
|
bp_ui_idle:
|
|
invoke Sleep,8
|
|
jmp bp_ui_loop
|
|
bp_ui_close:
|
|
call LeaveBowlingPlay3D
|
|
call FreeBowling3D
|
|
call FreeCharacterCast3D
|
|
invoke ReleaseDC,h3DWnd,h3DDC
|
|
invoke DestroyWindow,h3DWnd
|
|
invoke ExitProcess,0
|
|
ret
|
|
bp_ui_fail:
|
|
invoke ExitProcess,157
|
|
ret
|
|
bp_ui_mode_error:
|
|
invoke ExitProcess,158
|
|
ret
|
|
BowlingUiStart ENDP
|