| 1 |
if (live_call()) |
| 2 |
return global.live_result; |
| 3 |
if (message_current > (array_length_1d(prt) - 1) || prt[message_current] == 0) |
| 4 |
portrait = false; |
| 5 |
else |
| 6 |
portrait = true; |
| 7 |
if (position == 0) |
| 8 |
yy = 165; |
| 9 |
else |
| 10 |
yy = 5; |
| 11 |
var xx = 20; |
| 12 |
var portrait_xx = 52; |
| 13 |
var line_sep = 18; |
| 14 |
draw_set_font(dialogue_font); |
| 15 |
draw_set_color(c_white); |
| 16 |
draw_set_halign(fa_left); |
| 17 |
message_actual = string_copy(message[message_current], 0, cutoff); |
| 18 |
draw_text_ext_transformed(xx, yy + 10, string_hash_to_newline(message_actual), line_sep, -1, 1, 1, 0); |
| 19 |
if (color == true) |
| 20 |
{ |
| 21 |
if (color_set == false) |
| 22 |
{ |
| 23 |
for (var i = 0; i < (array_length_1d(message) - 1); i++) |
| 24 |
{ |
| 25 |
var len = array_length_2d(message_col, i); |
| 26 |
if (len == 0) |
| 27 |
{ |
| 28 |
message_col[i][0] = ""; |
| 29 |
} |
| 30 |
else if (len > 0) |
| 31 |
{ |
| 32 |
for (var j = 0; j < (array_length_1d(col_modif) - 1); j++) |
| 33 |
{ |
| 34 |
if (j < array_length_2d(message_col, i) && message_col[i][j] == 0) |
| 35 |
message_col[i][j] = ""; |
| 36 |
} |
| 37 |
} |
| 38 |
} |
| 39 |
color_set = true; |
| 40 |
} |
| 41 |
for (var j = 0; j < array_length_2d(message_col, message_current); j++) |
| 42 |
{ |
| 43 |
message_actual_col[j] = string_copy(message_col[message_current][j], 0, cutoff); |
| 44 |
draw_set_color(col_modif[j]); |
| 45 |
draw_text_ext(xx, yy + 10, string_hash_to_newline(message_actual_col[j]), line_sep, -1); |
| 46 |
} |
| 47 |
} |
| 48 |
draw_set_color(c_white); |
| 49 |
if (dialogue_is_minishop == true) |
| 50 |
{ |
| 51 |
var minishop_box_xx = 204; |
| 52 |
var minishop_box_yy = 92; |
| 53 |
draw_set_color(c_white); |
| 54 |
draw_rectangle(minishop_box_xx, minishop_box_yy, minishop_box_xx + 100, minishop_box_yy + 53, false); |
| 55 |
draw_set_color(c_black); |
| 56 |
draw_rectangle(minishop_box_xx + 3, minishop_box_yy + 3, (minishop_box_xx + 100) - 3, (minishop_box_yy + 53) - 3, false); |
| 57 |
draw_set_font(fnt_battle); |
| 58 |
draw_set_color(c_white); |
| 59 |
var item_count; |
| 60 |
for (item_count = 1; item_count <= 8; item_count++) |
| 61 |
{ |
| 62 |
if (global.item_slot[item_count] == "Nothing") |
| 63 |
break; |
| 64 |
} |
| 65 |
draw_text(217, 100, string_hash_to_newline("$ - " + string(global.player_gold) + "#SPACE - " + string(item_count - 1) + "/8")); |
| 66 |
} |
| 67 |
if (choice == false) |
| 68 |
exit; |
| 69 |
xx = 100; |
| 70 |
var spacing = 0.25; |
| 71 |
if (ch[4] != "") |
| 72 |
spacing = 0.5; |
| 73 |
if (portrait) |
| 74 |
spacing = 0.15; |
| 75 |
var ypos1, ypos2; |
| 76 |
if (position == 0) |
| 77 |
{ |
| 78 |
ypos1 = 190; |
| 79 |
if (ch[3] == "") |
| 80 |
ypos1 = 210; |
| 81 |
ypos2 = 210; |
| 82 |
} |
| 83 |
else |
| 84 |
{ |
| 85 |
ypos1 = 32; |
| 86 |
if (ch[3] == "") |
| 87 |
ypos1 = 56; |
| 88 |
ypos2 = 56; |
| 89 |
} |
| 90 |
if (ch[4] != "") |
| 91 |
xx -= 30; |
| 92 |
var xpos1 = xx; |
| 93 |
var xpos2 = xx + 122; |
| 94 |
if (portrait == true) |
| 95 |
xpos1 += 20; |
| 96 |
var xpos3 = xpos1; |
| 97 |
var xpos4 = xpos2; |
| 98 |
if (ch[2] == "") |
| 99 |
xpos1 = xpos1 + 56; |
| 100 |
if (ch[4] == "") |
| 101 |
xpos3 = xpos1 + 56; |
| 102 |
if (cutoff >= string_length(message[message_current])) |
| 103 |
{ |
| 104 |
draw_set_halign(fa_center); |
| 105 |
if (ch[4] != "") |
| 106 |
draw_set_halign(fa_left); |
| 107 |
draw_text(xpos1, ypos1, string_hash_to_newline(ch[1])); |
| 108 |
if (ch[2] != "") |
| 109 |
draw_text(xpos2, ypos1, string_hash_to_newline(ch[2])); |
| 110 |
if (ch[3] != "") |
| 111 |
draw_text(xpos3, ypos2, string_hash_to_newline(ch[3])); |
| 112 |
if (ch[4] != "") |
| 113 |
draw_text(xpos4, ypos2, string_hash_to_newline(ch[4])); |
| 114 |
draw_set_halign(fa_center); |
| 115 |
var soul_offset = string_width(string_hash_to_newline(ch[p])) * 0.5; |
| 116 |
if (ch[4] != "") |
| 117 |
soul_offset = 0; |
| 118 |
var soul_x, soul_y; |
| 119 |
switch (p) |
| 120 |
{ |
| 121 |
case 1: |
| 122 |
soul_x = xpos1 - soul_offset - 8; |
| 123 |
soul_y = ypos1 + 8; |
| 124 |
break; |
| 125 |
case 2: |
| 126 |
soul_x = xpos2 - soul_offset - 8; |
| 127 |
soul_y = ypos1 + 8; |
| 128 |
break; |
| 129 |
case 3: |
| 130 |
soul_x = xpos3 - soul_offset - 8; |
| 131 |
soul_y = ypos2 + 8; |
| 132 |
break; |
| 133 |
case 4: |
| 134 |
soul_x = xpos4 - soul_offset - 8; |
| 135 |
soul_y = ypos2 + 8; |
| 136 |
break; |
| 137 |
} |
| 138 |
draw_sprite(spr_heart_yellow_overworld, 0, soul_x, soul_y); |
| 139 |
} |
| 140 |
draw_set_halign(fa_left); |