KAZIK/src_graphics/heist_hq_render.inc

198 lines
5.5 KiB
PHP

RenderHQWorld3D PROC uses ebx esi edi
call UpdateCamera3D
call RenderCeilingAndFloor
cmp playerY,23*FP_1
jae hq_world_sky
cmp playerX,5*FP_1
jae hq_world_walls
hq_world_sky:
invoke DrawBox,0,0,320,120,00141B2Ah
hq_world_walls:
call RenderWalls
call PrepareCityDepth3D
mov esi,OFFSET hqEnemies
mov edi,HQ_GUARDS
hq_render_guard:
cmp [esi].HFEnemy.hp,0
jg @F
cmp [esi].HFEnemy.pose,3
jne hq_render_next_guard
@@:
mov eax,[esi].HFEnemy.x
mov hqObject.posX,eax
mov eax,[esi].HFEnemy.y
mov hqObject.posY,eax
mov eax,[esi].HFEnemy.pose
mov hqObject.frame,eax
invoke DrawCityObject3D,OFFSET hqObject,0
hq_render_next_guard:
add esi,SIZEOF HFEnemy
dec edi
jnz hq_render_guard
xor ebx,ebx
hq_render_team:
mov eax,hqTeamX[ebx*4]
mov hqObject.posX,eax
mov eax,hqTeamY[ebx*4]
mov hqObject.posY,eax
lea eax,[ebx+4]
mov hqObject.frame,eax
invoke DrawCityObject3D,OFFSET hqObject,0
inc ebx
cmp ebx,3
jb hq_render_team
invoke DrawCityObject3D,OFFSET hqVanObject,0
invoke DrawCityObject3D,OFFSET hqTerminalObject,0
mov hqSafeObject.frame,6
cmp hqLoot,0
je @F
mov hqSafeObject.frame,7
@@:
invoke DrawCityObject3D,OFFSET hqSafeObject,0
cmp hqIntel,0
jne @F
invoke DrawCityObject3D,OFFSET hqIntelObject,0
@@:
cmp hqCameras,0
je @F
invoke DrawCityObject3D,OFFSET hqCameraObject,0
@@:
ret
RenderHQWorld3D ENDP
RenderHQMission3D PROC uses ebx esi edi
cmp hqActive,0
je hq_render_done
cmp heistPhase,6
je hq_render_drive
cmp heistPhase,8
je hq_render_drive
call RenderHQWorld3D
cmp heistPhase,9
je hq_render_dead
mov eax,hqWeapon
shl eax,1
cmp hqFlash,0
jle @F
inc eax
@@:
mov ebx,154
cmp hqReload,0
jle @F
add ebx,70
@@:
invoke DrawAnimSprite3D,OFFSET hqWeaponArt,eax,240,ebx,300,320
invoke DrawBox,0,0,320,30,0014191Dh
invoke DrawString8x8,8,4,OFFSET hqTitle,00E7CA88h
mov eax,OFFSET hqStealthText
mov ecx,00A8DDB9h
cmp hqAlarm,0
je @F
mov eax,OFFSET hqAlarmText
mov ecx,00FF7777h
@@:
invoke DrawString8x8,8,18,eax,ecx
invoke DrawNumber,264,18,hqSuspicion,ecx
mov eax,OFFSET hqGoalTerminal
cmp hqAccess,0
je @F
mov eax,OFFSET hqGoalVault
@@:
cmp hqLoot,0
je @F
mov eax,OFFSET hqGoalEscape
@@:
mov esi,eax
invoke DrawBox,0,30,320,14,0014191Dh
invoke DrawString8x8,8,33,esi,00E7CA88h
cmp hqAction,0
je hq_render_intel
invoke DrawString8x8,8,52,OFFSET hqWorkingText,00E7CA88h
mov eax,hqActionTime
xor edx,edx
mov ecx,1000
div ecx
inc eax
invoke DrawNumber,208,52,eax,00E7CA88h
hq_render_intel:
cmp hqIntel,0
je @F
invoke DrawString8x8,8,66,OFFSET hqIntelText,00A8DDB9h
@@:
cmp hqLoot,0
jne hq_render_team_hint
invoke HFDistance,playerX,playerY,8*FP_1,7*FP_1
cmp eax,FP_1*3/2
ja hq_render_team_hint
invoke DrawString8x8,8,82,OFFSET hqIntelHint,00E7CA88h
hq_render_team_hint:
mov eax,OFFSET hqTeamWaitText
cmp hqTeamFollow,0
je @F
mov eax,OFFSET hqTeamFollowText
@@:
invoke DrawString8x8,8,196,eax,00A8DDB9h
invoke DrawBox,159,118,2,5,00FFFFFFh
invoke DrawBox,157,120,6,1,00FFFFFFh
invoke DrawBox,0,210,320,30,0014191Dh
invoke DrawString8x8,8,213,OFFSET hqHealthText,00A8DDB9h
invoke DrawNumber,32,213,hqHealth,00FFFFFFh
invoke DrawString8x8,80,213,OFFSET hqAmmoText,00A8DDB9h
mov ebx,hqWeapon
invoke DrawNumber,120,213,hqMagazine[ebx*4],00FFFFFFh
invoke DrawString8x8,144,213,OFFSET hqSlashText,00FFFFFFh
invoke DrawNumber,160,213,hqReserve[ebx*4],00FFFFFFh
invoke DrawString8x8,8,228,OFFSET hqControlsText,00A8B6BBh
cmp heistPhase,2
je hq_render_safe
cmp hqHurt,0
jle hq_render_done
invoke DrawBox,0,44,4,166,00FF4444h
invoke DrawBox,316,44,4,166,00FF4444h
jmp hq_render_done
hq_render_safe:
invoke DrawBoxBorder,162,46,150,158,00151A22h,00D8BC6Ah,1
invoke DrawString8x8,170,54,OFFSET hqSafeText,00E7CA88h
invoke DrawUnderworldSprite3D,OFFSET secPortraitsPack,3,190,74,92,92
invoke DrawNumber,224,170,heistDialPos,00FFFFFFh
invoke DrawNumber,176,170,heistDigitsFound,00A8DDB9h
mov eax,uwHeistTimer
xor edx,edx
mov ecx,1000
div ecx
invoke DrawNumber,274,170,eax,00A8DDB9h
invoke DrawString8x8,170,188,OFFSET hqDialKeys,00E7CA88h
jmp hq_render_done
hq_render_dead:
invoke DrawBoxBorder,20,72,280,100,00151A22h,00FF7777h,1
invoke DrawUnderworldText3D,32,88,OFFSET hqDeadText,32,00FF7777h
invoke DrawString8x8,32,144,OFFSET hqAbortText,00E7CA88h
jmp hq_render_done
hq_render_drive:
mov worldMap3D,OFFSET hqRoadMap
mov playerX,FP_1*165/10
mov playerAngle,384
mov eax,hqRideTime
mov ecx,21*FP_1
mul ecx
mov ecx,6000
div ecx
mov ebx,28*FP_1
sub ebx,eax
mov playerY,ebx
call UpdateCamera3D
call RenderCeilingAndFloor
invoke DrawBox,0,0,320,120,00141B2Ah
call RenderWalls
invoke DrawAnimSprite3D,OFFSET hqVanArt,0,0,0,640,480
invoke DrawBox,0,0,320,26,0014191Dh
mov eax,OFFSET hqOutboundText
cmp heistPhase,8
jne @F
mov eax,OFFSET hqInboundText
@@:
invoke DrawString8x8,8,6,eax,00E7CA88h
invoke DrawString8x8,8,228,OFFSET hqCrewRideText,00A8DDB9h
hq_render_done:
ret
RenderHQMission3D ENDP