From: parking_turkeys Date: Fri, 17 Jul 2026 17:31:14 +0000 (-0400) Subject: THIS DOES NOT WORK BECAUSE IM STUPID,,,, UH I THINK IM LOOKING UP HOW TO DO THIS... X-Git-Tag: v1.0~31 X-Git-Url: http://git.parking-turkeys.net/?a=commitdiff_plain;h=98dbfa0b22cbe3a551b54773ccc71cef6fb7f2c3;p=aichan-platformer.git THIS DOES NOT WORK BECAUSE IM STUPID,,,, UH I THINK IM LOOKING UP HOW TO DO THIS (im going to try one more time on my own lol) --- diff --git a/level.c b/level.c index 04439e0..15f2639 100644 --- a/level.c +++ b/level.c @@ -127,25 +127,31 @@ int drawcharimage(char *filename) 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 };