.data roofCastTest0 db "build\hall-expansion\roof-cast-0.bmp",0 roofCastTest1 db "build\hall-expansion\roof-cast-1.bmp",0 roofCastTest2 db "build\hall-expansion\roof-cast-2.bmp",0 roofCastTest3 db "build\hall-expansion\roof-cast-3.bmp",0 roofCastTest4 db "build\hall-expansion\roof-cast-4.bmp",0 roofCastTest5 db "build\hall-expansion\roof-cast-5.bmp",0 roofCastTest6 db "build\hall-expansion\roof-cast-6.bmp",0 roofCastTest7 db "build\hall-expansion\roof-cast-7.bmp",0 roofCastTestPaths dd OFFSET roofCastTest0,OFFSET roofCastTest1,OFFSET roofCastTest2,OFFSET roofCastTest3 dd OFFSET roofCastTest4,OFFSET roofCastTest5,OFFSET roofCastTest6,OFFSET roofCastTest7 .code RoofCharacterScaleNativeTests PROC uses ebx esi edi local moving:DWORD mov expansionStage,160 mov viewEye3D,ROOF_STANDING_EYE mov viewHorizon3D,HALF_H xor esi,esi roof_cast_test_visitor: mov eax,roofGuestMoving3D[esi*4] mov moving,eax xor ebx,ebx roof_cast_test_pose: mov roofGuestMoving3D[esi*4],ebx invoke ConfigureRoofVisitor3D,esi ; Height relative to standing eyes must match the hall, in either pose. mov eax,roofActor3D.worldH mov ecx,HALL_STANDING_EYE imul ecx mov ecx,ROOF_STANDING_EYE idiv ecx sub eax,CAST_HEIGHT cmp eax,-1 jl roof_cast_test_fail cmp eax,1 jg roof_cast_test_fail mov eax,roofActor3D.worldH imul eax,192 cdq mov ecx,224 idiv ecx cmp eax,roofActor3D.worldW jne roof_cast_test_fail mov eax,roofActor3D.worldH neg eax cdq mov ecx,56 idiv ecx cmp eax,roofActor3D.groundZ jne roof_cast_test_fail cmp roofActor3D.asset,OFFSET characterCast3D jne roof_cast_test_fail inc ebx cmp ebx,2 jb roof_cast_test_pose invoke DrawBox,0,0,SCREEN_W,SCREEN_H,001C2228h lea edi,zBuffer mov eax,7FFFFFFFh mov ecx,SCREEN_W rep stosd lea edi,cityDepthBuffer3D mov ecx,SCREEN_SIZE rep stosd mov roofActor3D.posX,16*FP_1 mov roofActor3D.posY,16*FP_1 invoke DrawCityObject3D,OFFSET roofActor3D,0 invoke ExpansionSnapshot,roofCastTestPaths[esi*4] mov eax,moving mov roofGuestMoving3D[esi*4],eax inc esi cmp esi,ROOF_GUEST_COUNT jb roof_cast_test_visitor mov viewEye3D,HALL_STANDING_EYE ret roof_cast_test_fail: invoke ExitProcess,expansionStage ret RoofCharacterScaleNativeTests ENDP