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