int drawdialogueline(char *l)
{
//DLGTEXTWIDTH (i always forget how to type this)
- char *lines[10] = {""}; // any more wont fit in tbh
-
- int i, n, x;
- i = 0; n = 0; x = 0;
- while (l[i] != '\0') {
- printf(&l[i]);
- //printf("i: %d; n: %d; x: %d\n", i, n, x);
- lines[n][x] = l[i];
- if (MeasureText(lines[n], 20) > DLGTEXTWIDTH) {
- lines[n][x] = '\0';
- n++; x=0; i--;
- };
-
- i++;
- };
- for (i = 0; i < 10; i++) {};
+ //gay
+ int i = 0;
+ char t = l[40];
+ int x = 40;
+ int z = 0;
+ int y = CHARADISPLAYWIDTH + DLGPADDING;
+ int done = 0;
+
+ while (done != 1) {
+ if (MeasureText(l+z, 20) <= DLGTEXTWIDTH) {
+ DrawText(l, y, DLGY + DLGPADDING * 2 ,20, BLACK);
+ y += 22;
+ z = x;
+ l[x] = t;
+ x += 30;
-
+ } else {
+ x -= 10;
+ t = l[x];
+ l[x] = '\0';
+ };
+
+
+ }
//DrawText(l, CHARADISPLAYWIDTH + DLGPADDING, DLGY + DLGPADDING * 2 ,20, BLACK); //add text wrapping later
};