Mercurial > mm7
comparison Arcomage.cpp @ 2215:e9625ad08541
fog fix and change 640,480 - window->GetWidth(), window->GetHeight()
author | Ritor1 |
---|---|
date | Fri, 14 Feb 2014 18:08:30 +0600 |
parents | 20995bb8895a |
children | 3f375342de12 |
comparison
equal
deleted
inserted
replaced
2214:20995bb8895a | 2215:e9625ad08541 |
---|---|
453 pTargetPoint.x = 0; | 453 pTargetPoint.x = 0; |
454 pTargetPoint.y = 0; | 454 pTargetPoint.y = 0; |
455 | 455 |
456 pSrcRect.left = 0; | 456 pSrcRect.left = 0; |
457 pSrcRect.top = 0; | 457 pSrcRect.top = 0; |
458 pSrcRect.right = 640; | 458 pSrcRect.right = window->GetWidth(); |
459 pSrcRect.bottom = 480; | 459 pSrcRect.bottom = window->GetHeight(); |
460 | 460 |
461 pRenderer->BeginScene(); | 461 pRenderer->BeginScene(); |
462 pArcomageGame->pBlit_Copy_pixels = pPixels; | 462 pArcomageGame->pBlit_Copy_pixels = pPixels; |
463 pRenderer->am_Blt_Copy(&pSrcRect, &pTargetPoint, 2); | 463 pRenderer->am_Blt_Copy(&pSrcRect, &pTargetPoint, 2); |
464 pRenderer->EndScene(); | 464 pRenderer->EndScene(); |
1605 if ( pArcomageGame->field_F9 ) | 1605 if ( pArcomageGame->field_F9 ) |
1606 { | 1606 { |
1607 pTargetXY.x = 0; | 1607 pTargetXY.x = 0; |
1608 pTargetXY.y = 0; | 1608 pTargetXY.y = 0; |
1609 pSrcXYZW.left = 0; | 1609 pSrcXYZW.left = 0; |
1610 pSrcXYZW.right = 640; | 1610 pSrcXYZW.right = window->GetWidth(); |
1611 pSrcXYZW.top = 0; | 1611 pSrcXYZW.top = 0; |
1612 pSrcXYZW.bottom = 480; | 1612 pSrcXYZW.bottom = window->GetHeight(); |
1613 am_BeginScene(pArcomageGame->pBackgroundPixels, -1, 1); | 1613 am_BeginScene(pArcomageGame->pBackgroundPixels, -1, 1); |
1614 pRenderer->am_Blt_Copy(&pSrcXYZW, &pTargetXY, 2); | 1614 pRenderer->am_Blt_Copy(&pSrcXYZW, &pTargetXY, 2); |
1615 am_EndScene(); | 1615 am_EndScene(); |
1616 DrawGameUI(animation_stage); | 1616 DrawGameUI(animation_stage); |
1617 pRenderer->Present(); | 1617 pRenderer->Present(); |
2124 POINT pTargetXY; // [sp+1Ch] [bp-Ch]@1 | 2124 POINT pTargetXY; // [sp+1Ch] [bp-Ch]@1 |
2125 int v24; // [sp+24h] [bp-4h]@1 | 2125 int v24; // [sp+24h] [bp-4h]@1 |
2126 | 2126 |
2127 v0 = GetPlayerHandCardCount(current_player_num); | 2127 v0 = GetPlayerHandCardCount(current_player_num); |
2128 pTargetXY.y = 327; | 2128 pTargetXY.y = 327; |
2129 v24 = (640 - 96 * v0) / (v0 + 1); | 2129 v24 = (window->GetWidth() - 96 * v0) / (v0 + 1); |
2130 pTargetXY.x = (640 - 96 * v0) / (v0 + 1); | 2130 pTargetXY.x = (window->GetWidth() - 96 * v0) / (v0 + 1); |
2131 for ( v2 = 0; v2 < v0; ++v2 ) | 2131 for ( v2 = 0; v2 < v0; ++v2 ) |
2132 { | 2132 { |
2133 //v3 = current_player_num; | 2133 //v3 = current_player_num; |
2134 if ( am_byte_4E185D) | 2134 if ( am_byte_4E185D) |
2135 { | 2135 { |
2264 if ( amuint_4FAA38 >= 9 ) | 2264 if ( amuint_4FAA38 >= 9 ) |
2265 { | 2265 { |
2266 am_uint_4FAA44_blt_xy.y = 18; | 2266 am_uint_4FAA44_blt_xy.y = 18; |
2267 am_uint_4FAA44_blt_xy.x = 120; | 2267 am_uint_4FAA44_blt_xy.x = 120; |
2268 v1 = GetPlayerHandCardCount(current_player_num); | 2268 v1 = GetPlayerHandCardCount(current_player_num); |
2269 v2 = (640 - 96 * v1) / v1 + 96; | 2269 v2 = (window->GetWidth() - 96 * v1) / v1 + 96; |
2270 if ( am_byte_4E185D ) | 2270 if ( am_byte_4E185D ) |
2271 { | 2271 { |
2272 // v3 = 188 * current_player_num + 8 * amuint_4FAA4C; | 2272 // v3 = 188 * current_player_num + 8 * amuint_4FAA4C; |
2273 // amuint_4FAA3C_blt_xy.x = (amuint_4FAA4C * v2 + *(am_Players[0].arr_6C[0] + v3) - 120) / 10; | 2273 // amuint_4FAA3C_blt_xy.x = (amuint_4FAA4C * v2 + *(am_Players[0].arr_6C[0] + v3) - 120) / 10; |
2274 amuint_4FAA3C_blt_xy.x=(amuint_4FAA4C * v2 + am_Players[current_player_num].card_shift[amuint_4FAA4C].x-120)/10; | 2274 amuint_4FAA3C_blt_xy.x=(amuint_4FAA4C * v2 + am_Players[current_player_num].card_shift[amuint_4FAA4C].x-120)/10; |
2465 if ( v26._40DD2F() ) | 2465 if ( v26._40DD2F() ) |
2466 { | 2466 { |
2467 v5 = GetPlayerHandCardCount(player_num); | 2467 v5 = GetPlayerHandCardCount(player_num); |
2468 pXYZW.top = 327; | 2468 pXYZW.top = 327; |
2469 pXYZW.bottom = 455; | 2469 pXYZW.bottom = 455; |
2470 pXYZW.left = (640 - 96 * v5) / (v5 + 1); | 2470 pXYZW.left = (window->GetWidth() - 96 * v5) / (v5 + 1); |
2471 var18 = pXYZW.left + 96; | 2471 var18 = pXYZW.left + 96; |
2472 pXYZW.right = pXYZW.left + 96; | 2472 pXYZW.right = pXYZW.left + 96; |
2473 for( hand_index = 0; hand_index < v5; hand_index++) | 2473 for( hand_index = 0; hand_index < v5; hand_index++) |
2474 { | 2474 { |
2475 //for ( i = 0; i < 10; ++i ) | 2475 //for ( i = 0; i < 10; ++i ) |
2547 | 2547 |
2548 if ( pCards[am_Players[player_num].cards_at_hand[i]].can_be_discarded) | 2548 if ( pCards[am_Players[player_num].cards_at_hand[i]].can_be_discarded) |
2549 { | 2549 { |
2550 ArcomageGame::PlaySound(22); | 2550 ArcomageGame::PlaySound(22); |
2551 v8 = GetPlayerHandCardCount(current_player_num); | 2551 v8 = GetPlayerHandCardCount(current_player_num); |
2552 v10 = am_Players[player_num].card_shift[i].x + (640 - 96 * v8) / (v8 + 1); | 2552 v10 = am_Players[player_num].card_shift[i].x + (window->GetWidth() - 96 * v8) / (v8 + 1); |
2553 amuint_4FAA5C_blt_xy.x = v10; | 2553 amuint_4FAA5C_blt_xy.x = v10; |
2554 amuint_4FAA5C_blt_xy.y = am_Players[player_num].card_shift[i].y + 327;//v11; | 2554 amuint_4FAA5C_blt_xy.y = am_Players[player_num].card_shift[i].y + 327;//v11; |
2555 v12 = 0; | 2555 v12 = 0; |
2556 | 2556 |
2557 if ( !am_byte_4FAA75 ) | 2557 if ( !am_byte_4FAA75 ) |
2610 { | 2610 { |
2611 ArcomageGame::PlaySound(23); | 2611 ArcomageGame::PlaySound(23); |
2612 cards_at_hand = GetPlayerHandCardCount(current_player_num); | 2612 cards_at_hand = GetPlayerHandCardCount(current_player_num); |
2613 pArcomageGame->field_F6 = 1; | 2613 pArcomageGame->field_F6 = 1; |
2614 v12 = am_Players[player_num].card_shift[card_index].x + | 2614 v12 = am_Players[player_num].card_shift[card_index].x + |
2615 (640 - 96 * cards_at_hand) / (cards_at_hand + 1)+ | 2615 (window->GetWidth() - 96 * cards_at_hand) / (cards_at_hand + 1)+ |
2616 96 * card_index ; | 2616 96 * card_index ; |
2617 | 2617 |
2618 // v13 = *(int *)((char *)&am_Players[0].arr_6C[0][1] + v10) + 327; | 2618 // v13 = *(int *)((char *)&am_Players[0].arr_6C[0][1] + v10) + 327; |
2619 amuint_4FAA5C_blt_xy.x = v12;//v12; | 2619 amuint_4FAA5C_blt_xy.x = v12;//v12; |
2620 amuint_4FAA5C_blt_xy.y = am_Players[player_num].card_shift[card_index].y + 327;//v13; | 2620 amuint_4FAA5C_blt_xy.y = am_Players[player_num].card_shift[card_index].y + 327;//v13; |
3583 | 3583 |
3584 pXY.x = 0; | 3584 pXY.x = 0; |
3585 pXY.y = 0; | 3585 pXY.y = 0; |
3586 ArcomageGame::LoadBackground(); | 3586 ArcomageGame::LoadBackground(); |
3587 pXYZW.left = 0; | 3587 pXYZW.left = 0; |
3588 pXYZW.right = 640; | 3588 pXYZW.right = window->GetWidth(); |
3589 pXYZW.top = 0; | 3589 pXYZW.top = 0; |
3590 pXYZW.bottom = 480; | 3590 pXYZW.bottom = window->GetHeight(); |
3591 am_BeginScene(pArcomageGame->pBackgroundPixels, -1, 1); | 3591 am_BeginScene(pArcomageGame->pBackgroundPixels, -1, 1); |
3592 pRenderer->am_Blt_Copy(&pXYZW, &pXY, 2); | 3592 pRenderer->am_Blt_Copy(&pXYZW, &pXY, 2); |
3593 am_EndScene(); | 3593 am_EndScene(); |
3594 pRenderer->Present(); | 3594 pRenderer->Present(); |
3595 ArcomageGame::LoadSprites(); | 3595 ArcomageGame::LoadSprites(); |