From e3510eeaa01ab6d050a610ff7fa7962bcd7e79cc Mon Sep 17 00:00:00 2001 From: John Neumeier Date: Mon, 3 Nov 2025 13:23:20 +0100 Subject: [PATCH] graphicalGame.c fix --- Start_Windows/.idea/editor.xml | 580 +++++++++++++++++++++++++++++++++ Start_Windows/.idea/vcs.xml | 6 + Start_Windows/graphicalGame.c | 23 +- Start_Windows/runTests.exe | Bin 87803 -> 87803 bytes 4 files changed, 588 insertions(+), 21 deletions(-) create mode 100644 Start_Windows/.idea/editor.xml create mode 100644 Start_Windows/.idea/vcs.xml diff --git a/Start_Windows/.idea/editor.xml b/Start_Windows/.idea/editor.xml new file mode 100644 index 0000000..226ca24 --- /dev/null +++ b/Start_Windows/.idea/editor.xml @@ -0,0 +1,580 @@ + + + + + \ No newline at end of file diff --git a/Start_Windows/.idea/vcs.xml b/Start_Windows/.idea/vcs.xml new file mode 100644 index 0000000..6c0b863 --- /dev/null +++ b/Start_Windows/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Start_Windows/graphicalGame.c b/Start_Windows/graphicalGame.c index 3b95e29..fc648b6 100644 --- a/Start_Windows/graphicalGame.c +++ b/Start_Windows/graphicalGame.c @@ -66,27 +66,8 @@ typedef struct // Creates a helper message to guide the user static HelperMessage createHelperMessage(unsigned int screenWidth) { - // Der Hilfetext, der dem Spieler angezeigt wird, um das Spielprinzip zu erklären - const char *text = "Please search below for the words located at the bottom \n" - "and draw a line exactly on the desired characters ..."; - - // Initialisiert eine HelperMessage-Struktur: - // - text: der Hinweistext - // - start: Startposition des Textes (x=0, y=0) - // - end: Endposition des Textes (x=screenWidth, y=0) – also über die gesamte Breite - // - fontSize: Schriftgröße des Textes (hier: 18) - HelperMessage msg = { "", {0, 0}, {screenWidth, 0}, 18 }; - - // Kopiert den Hinweistext in das msg.text-Feld (sicher mit strncpy) - strncpy(msg.text, text, sizeof(msg.text) - 1); - - // Stellt sicher, dass der Text nullterminiert ist - msg.text[sizeof(msg.text) - 1] = '\0'; - - // Gibt die fertige HelperMessage zurück - return msg; -} -`` + const char *text = "Please search below for the words located at the bottom \nand draw a line exactly on the desired characters ..."; + HelperMessage msg = {"", {0, 0}, {screenWidth, 0}, 18}; // Copy text into msg, ensuring does not exceed max length strncpy(msg.text, text, MAX_MESSAGE_LEN); diff --git a/Start_Windows/runTests.exe b/Start_Windows/runTests.exe index 147f4e62322cca04fcf4bb86461c3055a02d20ed..c2de870081c8b57f0e80ca51111e75ebd35a7958 100644 GIT binary patch delta 26 icmeypmi6~q)(IWV_47C;cKb57&tz=8z4bPuLKpz1z6*;0 delta 26 icmeypmi6~q)(IWVt9{ugcKb4K^k8bdz4bPuLKpy}UJE|}