48 bool DiscardCard(
int player_num,
int card_slot_index);
49 bool PlayCard(
int player_num,
int card_slot_num);
57 void DrawRect(
Rect *pXYZW,
unsigned __int16 uColor,
char bSolidFill);
62 return Color16(uColor & 0xFF, (uColor >> 8) & 0xFF, (uColor >> 16) & 0xFF);
80 {30, 100, 15, 5, 2, 2, 2, 10, 10, 10, 0},
81 {50, 150, 20, 5, 2, 2, 2, 5, 5, 5, 1},
82 {50, 150, 20, 5, 2, 2, 2, 5, 5, 5, 2},
83 {75, 200, 25, 10, 3, 3, 3, 5, 5, 5, 2},
84 {75, 200, 20, 10, 3, 3, 3, 5, 5, 5, 1},
85 {100, 300, 30, 15, 4, 4, 4, 10, 10, 10, 1},
86 {100, 300, 30, 15, 4, 4, 4, 10, 10, 10, 2},
87 {150, 400, 20, 10, 5, 5, 5, 25, 25, 25, 0},
88 {200, 500, 20, 10, 1, 1, 1, 15, 15, 15, 2},
89 {100, 300, 20, 50, 1, 1, 5, 5, 5, 25, 0},
90 {125, 350, 10, 20, 3, 1, 2, 15, 5, 10, 2},
91 {125, 350, 10, 20, 3, 1, 2, 15, 5, 10, 1},
92 {100, 300, 50, 50, 5, 3, 5, 20, 10, 20, 0}};
94 #define SIG_MEMALOC 0x67707274 // memory allocated
95 #define SIG_MEMFREE 0x78787878 // memory free
193 return (
x >= pXYZW->
x) && (
x <= pXYZW->
z) && (
y >= pXYZW->
y) && (
y <= pXYZW->
w);
214 v2->mem_signature = SIG_MEMALOC;
215 v2->remaining_sparks_to_init = 0;
216 v2->prev_init_overflow = 0.0;
217 v2->effect_active = 0;
218 v2->params_filled = 0;
278 float total_to_init = 0;
286 bool active_check = 0;
308 if (total_to_init >= 1.0) {
347 signed int arr_slot = 0;
348 for (arr_slot = 0; arr_slot < 10; arr_slot++) {
357 if (arr_slot == 9)
return 2;
362 if (effect_value <= 0) {
364 effect_value = -effect_value;
390 if (10 * effect_value > 150) effect_value = 15;
410 for (
int i = 0; i < 10; ++i) {
419 for (
int j = 0; j < 150; ++j) {
458 rgb_pixel_color = 0xFF00FF00;
462 for (
int j = 0; j < 150; ++j) {
472 temppix[
x +
y *
width] = rgb_pixel_color;
475 temppix[
x +
y *
width] = rgb_pixel_color;
476 temppix[((
x + 1) +
y *
width)] = rgb_pixel_color;
477 temppix[(
x + (
y+1) *
width)] = rgb_pixel_color;
478 temppix[((
x + 1) + (
y+1) *
width)] = rgb_pixel_color;
486 render->DrawTextureAlphaNew(xmin / 640., ymin / 480., temp);
575 window->PeekSingleMessage();
606 const int mastery_coeff[V_INDEX_MAX][2] = {
619 int element_power = 0;
630 card_power += mastery_coeff[P_TOWER_M10][mastery] * element_power;
632 card_power += 20 * element_power;
644 card_power += mastery_coeff[P_WALL_M10][mastery] * element_power;
646 card_power += 5 * element_power;
664 card_power += 40 * element_power;
675 card_power += 40 * element_power;
684 card_power += 40 * element_power;
693 card_power += 2 * element_power;
702 card_power += 2 * element_power;
711 card_power += 2 * element_power;
718 card_power += mastery_coeff[E_TOWER][mastery] * element_power;
725 card_power += mastery_coeff[E_WALL][mastery] * element_power;
727 card_power -= mastery_coeff[E_BUILDINGS][mastery] *
736 card_power += mastery_coeff[E_QUARRY][mastery] * element_power;
744 card_power += mastery_coeff[E_MAGIC][mastery] * element_power;
751 card_power += mastery_coeff[E_ZOO][mastery] * element_power;
758 card_power += mastery_coeff[E_RES][mastery] * element_power;
765 card_power += mastery_coeff[E_RES][mastery] * element_power;
772 card_power += mastery_coeff[E_RES][mastery] * element_power;
785 if (element_power > 3) {
788 card_power += 5 * element_power;
814 if (ai_player_cards_count == 0)
return true;
821 int random_card_slot;
823 for (
int i = 0; i < 10; ++i) {
824 random_card_slot =
rand_interval(0, ai_player_cards_count - 1);
826 return PlayCard(player_num, random_card_slot);
831 random_card_slot =
rand_interval(0, ai_player_cards_count - 1);
840 for (
int i = 0; i < 10; ++i) {
841 if (i >= ai_player_cards_count) {
851 for (
int i = 0; i < ai_player_cards_count; ++i) {
858 for (
int j = ai_player_cards_count - 1; j >= 0; --j) {
859 for (
int m = 0;
m < j; ++
m) {
872 int discard_slot = 0;
873 for (
int i = ai_player_cards_count - 1; i; --i) {
883 for (
int i = 0; i < ai_player_cards_count - 1; ++i) {
897 bool am_turn_not_finished = 0;
900 am_turn_not_finished = 1;
903 while (am_turn_not_finished) {
928 int frame_quant_time;
934 }
while (frame_quant_time < 4);
953 if (div == 0) div = 1;
955 explos_coords.
x = 514;
956 explos_coords.
y = 296;
961 if (div == 0) div = 1;
963 explos_coords.
x = 442;
964 explos_coords.
y = 296;
970 if (div == 0) div = 1;
972 explos_coords.
x = 122;
973 explos_coords.
y = 296;
978 if (div == 0) div = 1;
980 explos_coords.
x = 180;
981 explos_coords.
y = 296;
1007 for (
int i = 0; i < 10; ++i) {
1026 int card_id_counter;
1028 signed int card_dispenser_counter;
1038 for (i = 0; i < 2; ++i) {
1048 for (j = 0; j < 10; ++j) {
1060 for (i = 0, card_dispenser_counter = -2, card_id_counter = 0; i < DECK_SIZE;
1061 ++i, ++card_dispenser_counter) {
1064 switch (card_dispenser_counter) {
1097 char card_taken_flags[DECK_SIZE];
1102 memset(card_taken_flags, 0, DECK_SIZE);
1104 for (i = 0; i < 2; ++i) {
1105 for (j = 0; j < 10; ++j) {
1107 for (
m = 0;
m < DECK_SIZE; ++
m) {
1120 for (i = 0; i < DECK_SIZE; ++i) {
1122 rand_deck_pos = rand() % DECK_SIZE;
1123 }
while (card_taken_flags[rand_deck_pos] == 1);
1125 card_taken_flags[rand_deck_pos] = 1;
1144 signed int deck_index;
1146 signed int card_slot_indx;
1150 if (deck_index >= DECK_SIZE) {
1166 if (card_slot_indx != -1) {
1178 for (
int i = 0; i < 10; ++i) {
1179 if (
am_Players[player_num].cards_at_hand[i] == -1)
return i;
1195 char player_name[64];
1210 strcpy(player_name,
"The Next Player is: ");
1259 for (
int i = 0; i < 2; ++i) {
1281 int animation_stage = 20;
1288 int frame_quant_time;
1289 bool break_loop =
false;
1294 }
while (frame_quant_time < 4);
1357 if (animation_stage < 0) {
1365 animation_stage = 20;
1409 }
while (!break_loop);
1431 for (
int i = 0; i < 10; ++i) {
1438 String t =
"Are you sure you want to resign?\n Press ESC again to confirm";
1463 render->am_Blt_Chroma(&pSrcRect, &pTargetXY, 0, 2);
1467 render->am_Blt_Chroma(&pSrcRect, &pTargetXY, 0, 2);
1512 Point text_position;
1518 text_position.
y = 306;
1523 strcpy(text_buff,
am_Players[0].pPlayerName);
1526 text_position.
y = 21;
1529 strcpy(text_buff,
am_Players[1].pPlayerName);
1532 text_position.
y = 21;
1538 text_position.
y = 305;
1543 text_position.
y = 305;
1549 text_position.
y = 305;
1554 text_position.
y = 305;
1560 text_position.
x = 14;
1561 text_position.
y = 92;
1566 text_position.
y = 92;
1567 text_position.
x = 561;
1573 text_position.
y = 164;
1574 text_position.
x = 14;
1579 text_position.
y = 164;
1580 text_position.
x = 561;
1586 text_position.
y = 236;
1587 text_position.
x = 14;
1592 text_position.
y = 236;
1593 text_position.
x = 561;
1597 text_position.
y = 114;
1598 text_position.
x = 10;
1601 text_position.
x = 557;
1602 text_position.
y = 114;
1606 text_position.
x = 10;
1607 text_position.
y = 186;
1610 text_position.
x = 557;
1611 text_position.
y = 186;
1615 text_position.
x = 10;
1616 text_position.
y = 258;
1619 text_position.
x = 557;
1620 text_position.
y = 258;
1628 pTargetPoint.
x = pXY->
x;
1629 pTargetPoint.
y = pXY->
y;
1630 for (
auto i = str.begin(); i != str.end(); ++i) {
1635 pSrcRect.
z = v7 - 842;
1636 pSrcRect.
x = v7 - 864;
1641 pTargetPoint.
x += 22;
1650 pTargetPoint.
x = pXY->
x;
1651 pTargetPoint.
y = pXY->
y;
1652 for (
auto i = str.begin(); i != str.end(); ++i) {
1657 pSrcRect.
x = v7 - 370;
1658 pSrcRect.
z = v7 - 357;
1662 render->am_Blt_Chroma(&pSrcRect, &pTargetPoint, 0, 2);
1663 pTargetPoint.
x += 13;
1672 pTargetPoint.
x = pXY->
x;
1673 pTargetPoint.
y = pXY->
y;
1674 for (
auto i = str.begin(); i != str.end(); ++i) {
1679 pSrcRect.
x = v7 - 370;
1680 pSrcRect.
z = v7 - 357;
1684 render->am_Blt_Chroma(&pSrcRect, &pTargetPoint, 0, 2);
1685 pTargetPoint.
x += 13;
1694 pTargetPoint.
x = pXY->
x;
1695 pTargetPoint.
y = pXY->
y;
1696 for (
auto i = str.begin(); i != str.end(); ++i) {
1700 int x_offset = 13 * *i;
1701 pSrcRect.
x = x_offset - 370;
1702 pSrcRect.
z = x_offset - 357;
1706 render->am_Blt_Chroma(&pSrcRect, &pTargetPoint, 0, 2);
1707 pTargetPoint.
x += 13;
1725 pSrcXYZW.
w = tower_top;
1727 pTargetXY.
y = 297 - tower_top;
1728 if (tower_height > 0)
render->am_Blt_Chroma(&pSrcXYZW, &pTargetXY, 0, 2);
1735 pTargetXY.
y = 203 - tower_top;
1748 pSrcXYZW.
w = tower_top;
1750 pTargetXY.
y = 297 - tower_top;
1751 if (tower_height > 0)
render->am_Blt_Chroma(&pSrcXYZW, &pTargetXY, 0, 2);
1759 pTargetXY.
y = 203 - tower_top;
1770 if (player_0_h > 100) player_0_h = 100;
1773 if (player_0_h > 0) {
1777 int player_0_pixh = 200 * player_0_h / 100;
1779 pSrcXYZW.
w = player_0_pixh;
1781 pTargetXY.
y = 297 - player_0_pixh;
1787 if (player_1_h > 100) player_1_h = 100;
1788 if (player_1_h > 0) {
1791 int player_1_pixh = 200 * player_1_h / 100;
1793 pSrcXYZW.
w = player_1_pixh;
1795 pTargetXY.
y = 297 - player_1_pixh;
1808 int card_spacing = (
window->GetWidth() - 96 * card_count) / (card_count + 1);
1809 pTargetXY.
x = card_spacing;
1811 for (
int card_slot = 0; card_slot < card_count; ++card_slot) {
1828 render->am_Blt_Chroma(&pSrcXYZW, &pTargetXY, 0, 2);
1833 render->am_Blt_Chroma(&pSrcXYZW, &pTargetXY, 0, 0);
1835 render->am_Blt_Chroma(&pSrcXYZW, &pTargetXY, 0, 2);
1847 pTargetXY.
x += card_spacing + 96;
1851 for (
int table_cards = 0; table_cards < 10; ++table_cards) {
1857 render->am_Blt_Chroma(&pSrcXYZW, &
shown_cards[table_cards].hide_anim_pos, 0, 0);
1871 if (table_cards == 9) {
1890 render->am_Blt_Chroma(&pSrcXYZW, &
shown_cards[table_cards].hide_anim_pos, 0, 0);
1905 render->am_Blt_Chroma(&pSrcXYZW, &pTargetXY, 0, 0);
1922 int card_spacing = (
window->GetWidth() - (96 * card_count)) / (card_count + 1);
1964 if (animation_stage <= 10) {
1965 if (animation_stage == 10) {
1968 for (card_slot = 0; card_slot < 10; ++card_slot) {
1981 render->am_Blt_Chroma(&pSrcXYZW, &pTargetXY, 0, 0);
1999 if (animation_stage > 15.0) {
2009 if (animation_stage > 5) {
2010 if (animation_stage == 15) {
2019 render->am_Blt_Chroma(&pSrcXYZW, &pTargetXY, 0, 2);
2024 if (animation_stage == 5.0) {
2029 for (v17 = 0; v17 < 10; ++v17) {
2039 render->am_Blt_Chroma(&pSrcXYZW, &pTargetXY, 0, 2);
2044 if (animation_stage > 0) {
2054 if (animation_stage == 0) {
2057 for (v19 = 0; v19 < 10; ++v19) {
2068 render->am_Blt_Chroma(&pSrcXYZW, &pTargetXY, 0, 0);
2082 pCardRect->
y = 128 * yslot + 220;
2083 pCardRect->
x = 96 * xslot;
2084 pCardRect->
w = pCardRect->
y + 128;
2085 pCardRect->
z = pCardRect->
x + 96;
2090 for (
int i = 0; i < 10; ++i) {
2091 if (
am_Players[player_num].cards_at_hand[i] != -1) ++card_count;
2106 if (get_mouse.
Update()) {
2109 int card_spacing = (
window->GetWidth() - 96 * card_count) / (card_count + 1);
2112 pXYZW.
x = card_spacing;
2113 int card_offset = pXYZW.
x + 96;
2114 pXYZW.
z = card_offset;
2117 for (
int hand_index = 0; hand_index < card_count; hand_index++) {
2119 if (
am_Players[player_num].cards_at_hand[hand_index] != -1) {
2129 if (get_mouse.
Inside(&pXYZW)) {
2152 pXYZW.
x += card_offset;
2153 pXYZW.
z += card_offset;
2164 if (card_slot_index <= -1)
return false;
2167 if (
pCards[
am_Players[player_num].cards_at_hand[card_slot_index]].can_be_discarded) {
2170 int card_spacing = (
window->GetWidth() - (96 * card_count)) / (card_count + 1);
2178 for (table_slot = 0; table_slot < 10; ++table_slot) {
2202 if (card_slot_num <= -1)
return false;
2208 int card_spacing = (
window->GetWidth() - (96 * cards_at_hand)) / (cards_at_hand + 1);
2252 #define APPLY_TO_PLAYER(PLAYER, ENEMY, FIELD, VAL, RES) \
2255 if (PLAYER->FIELD < ENEMY->FIELD) { \
2256 PLAYER->FIELD = ENEMY->FIELD; \
2257 RES = ENEMY->FIELD - PLAYER->FIELD; \
2260 PLAYER->FIELD += (signed int)(VAL); \
2261 if (PLAYER->FIELD < 0) PLAYER->FIELD = 0; \
2262 RES = (signed int)(VAL); \
2266 #define APPLY_TO_ENEMY(PLAYER, ENEMY, FIELD, VAL, RES) \
2267 APPLY_TO_PLAYER(ENEMY, PLAYER, FIELD, VAL, RES)
2269 #define APPLY_TO_BOTH(PLAYER, ENEMY, FIELD, VAL, RES_P, RES_E) \
2272 if (PLAYER->FIELD != ENEMY->FIELD) { \
2273 if (PLAYER->FIELD <= ENEMY->FIELD) { \
2274 PLAYER->FIELD = ENEMY->FIELD; \
2275 RES_P = ENEMY->FIELD - PLAYER->FIELD; \
2277 ENEMY->FIELD = PLAYER->FIELD; \
2278 RES_E = PLAYER->FIELD - ENEMY->FIELD; \
2282 PLAYER->FIELD += (signed int)(VAL); \
2283 ENEMY->FIELD += (signed int)(VAL); \
2284 if (PLAYER->FIELD < 0) { \
2285 PLAYER->FIELD = 0; \
2287 if (ENEMY->FIELD < 0) { \
2290 RES_P = (signed int)(VAL); \
2291 RES_E = (signed int)(VAL); \
2296 int enemy_num = ((player_num + 1) % 2);
2300 int buildings_e = 0;
2301 int buildings_p = 0;
2395 APPLY_TO_PLAYER(player, enemy, quarry_level,
2397 APPLY_TO_PLAYER(player, enemy, magic_level,
2401 APPLY_TO_PLAYER(player, enemy, resource_bricks,
2403 APPLY_TO_PLAYER(player, enemy, resource_gems, pCard->
to_player_gems,
2405 APPLY_TO_PLAYER(player, enemy, resource_beasts,
2412 APPLY_TO_PLAYER(player, enemy, wall_height, pCard->
to_player_wall,
2417 APPLY_TO_ENEMY(player, enemy, quarry_level,
2419 APPLY_TO_ENEMY(player, enemy, magic_level,
2423 APPLY_TO_ENEMY(player, enemy, resource_bricks,
2425 APPLY_TO_ENEMY(player, enemy, resource_gems, pCard->
to_enemy_gems,
2427 APPLY_TO_ENEMY(player, enemy, resource_beasts,
2434 APPLY_TO_ENEMY(player, enemy, wall_height, pCard->
to_enemy_wall,
2436 APPLY_TO_ENEMY(player, enemy, tower_height, pCard->
to_enemy_tower,
2439 APPLY_TO_BOTH(player, enemy, quarry_level,
2441 APPLY_TO_BOTH(player, enemy, magic_level,
2445 APPLY_TO_BOTH(player, enemy, resource_bricks,
2447 APPLY_TO_BOTH(player, enemy, resource_gems, pCard->
to_pl_enm_gems,
2449 APPLY_TO_BOTH(player, enemy, resource_beasts,
2474 APPLY_TO_PLAYER(player, enemy, quarry_level,
2476 APPLY_TO_PLAYER(player, enemy, magic_level,
2480 APPLY_TO_PLAYER(player, enemy, resource_bricks,
2482 APPLY_TO_PLAYER(player, enemy, resource_gems,
2484 APPLY_TO_PLAYER(player, enemy, resource_beasts,
2493 APPLY_TO_PLAYER(player, enemy, tower_height,
2496 APPLY_TO_ENEMY(player, enemy, quarry_level,
2498 APPLY_TO_ENEMY(player, enemy, magic_level,
2502 APPLY_TO_ENEMY(player, enemy, resource_bricks,
2504 APPLY_TO_ENEMY(player, enemy, resource_gems, pCard->
to_enemy_gems2,
2506 APPLY_TO_ENEMY(player, enemy, resource_beasts,
2513 APPLY_TO_ENEMY(player, enemy, wall_height, pCard->
to_enemy_wall2,
2518 APPLY_TO_BOTH(player, enemy, quarry_level,
2520 APPLY_TO_BOTH(player, enemy, magic_level,
2524 APPLY_TO_BOTH(player, enemy, resource_bricks,
2528 APPLY_TO_BOTH(player, enemy, resource_beasts,
2569 Point explos_coords;
2572 explos_coords.
x = 573;
2573 explos_coords.
y = 92;
2577 explos_coords.
x = 26;
2578 explos_coords.
y = 92;
2582 explos_coords.
x = 573;
2583 explos_coords.
y = 164;
2587 explos_coords.
x = 26;
2588 explos_coords.
y = 164;
2592 explos_coords.
x = 573;
2593 explos_coords.
y = 236;
2597 explos_coords.
x = 26;
2598 explos_coords.
y = 236;
2602 explos_coords.
x = 563;
2603 explos_coords.
y = 114;
2607 explos_coords.
x = 16;
2608 explos_coords.
y = 114;
2612 explos_coords.
x = 563;
2613 explos_coords.
y = 186;
2617 explos_coords.
x = 16;
2618 explos_coords.
y = 186;
2622 explos_coords.
x = 563;
2623 explos_coords.
y = 258;
2627 explos_coords.
x = 16;
2628 explos_coords.
y = 258;
2632 explos_coords.
x = 442;
2633 explos_coords.
y = 296;
2637 explos_coords.
x = 180;
2638 explos_coords.
y = 296;
2642 explos_coords.
x = 514;
2643 explos_coords.
y = 296;
2647 explos_coords.
x = 122;
2648 explos_coords.
y = 296;
2652 explos_coords.
x = 442;
2653 explos_coords.
y = 296;
2657 explos_coords.
x = 514;
2658 explos_coords.
y = 296;
2662 explos_coords.
x = 180;
2663 explos_coords.
y = 296;
2667 explos_coords.
x = 122;
2668 explos_coords.
y = 296;
2673 explos_coords.
x = 26;
2674 explos_coords.
y = 92;
2678 explos_coords.
x = 573;
2679 explos_coords.
y = 92;
2683 explos_coords.
x = 26;
2684 explos_coords.
y = 164;
2688 explos_coords.
x = 573;
2689 explos_coords.
y = 164;
2693 explos_coords.
x = 26;
2694 explos_coords.
y = 236;
2698 explos_coords.
x = 573;
2699 explos_coords.
y = 236;
2703 explos_coords.
x = 16;
2704 explos_coords.
y = 114;
2708 explos_coords.
x = 563;
2709 explos_coords.
y = 114;
2713 explos_coords.
x = 16;
2714 explos_coords.
y = 186;
2718 explos_coords.
x = 563;
2719 explos_coords.
y = 186;
2723 explos_coords.
x = 16;
2724 explos_coords.
y = 258;
2728 explos_coords.
x = 563;
2729 explos_coords.
y = 258;
2733 explos_coords.
x = 180;
2734 explos_coords.
y = 296;
2738 explos_coords.
x = 442;
2739 explos_coords.
y = 296;
2743 explos_coords.
x = 122;
2744 explos_coords.
y = 296;
2748 explos_coords.
x = 514;
2749 explos_coords.
y = 296;
2753 explos_coords.
x = 180;
2754 explos_coords.
y = 296;
2758 explos_coords.
x = 122;
2759 explos_coords.
y = 296;
2763 explos_coords.
x = 442;
2764 explos_coords.
y = 296;
2768 explos_coords.
x = 514;
2769 explos_coords.
y = 296;
2774 #undef APPLY_TO_BOTH
2775 #undef APPLY_TO_ENEMY
2776 #undef APPLY_TO_PLAYER
2785 if (wall >= -damage) {
2806 unsigned int tavern_num;
2852 }
else if (
am_Players[0].tower_height <= 0 &&
2901 if (winner == -1 && victory_type == -1) {
2916 if (pl_resource == en_resource) {
2920 winner = (pl_resource <= en_resource) +
2925 }
else if (winner == 0 && victory_type == 4) {
2926 if (pl_resource != en_resource) {
2928 (pl_resource <= en_resource) + 1;
2953 for (
uint i = 108; i <= 120; ++i) {
2957 if (tavern_num == 13)
2961 for (
int i = 0; i < 4; ++i) {
2964 PLAYER_GUILD_BITS__ARCOMAGE_WIN, 1);
2970 for (
int i = 0; i < 4; ++i) {
2973 PLAYER_GUILD_BITS__ARCOMAGE_LOSE, 1);
3001 for (
int i = 0; i < 10; ++i) {
3002 int xslot = (i + 1) % 4;
3003 int yslot = (i + 1) / 4;
3015 for (
int i = 0; i < 10; ++i)
3067 for (
int i = pXYZW->
y; i <= pXYZW->
w; ++i)
3068 render->RasterLine2D(pXYZW->
x, i, pXYZW->
z, i, uColor);
3070 render->RasterLine2D(pXYZW->
x, pXYZW->
y, pXYZW->
z, pXYZW->
y, uColor);
3071 render->RasterLine2D(pXYZW->
z, pXYZW->
y, pXYZW->
z, pXYZW->
w, uColor);
3072 render->RasterLine2D(pXYZW->
z, pXYZW->
w, pXYZW->
x, pXYZW->
w, uColor);
3073 render->RasterLine2D(pXYZW->
x, pXYZW->
w, pXYZW->
x, pXYZW->
y, uColor);