From 18b34d006630f184fac146dda54b2c8e4881e7fb Mon Sep 17 00:00:00 2001 From: Misa Date: Sun, 28 Jun 2020 12:43:12 -0700 Subject: [PATCH] Add logs if a Graphics func was stopped from indexing OoB This doesn't happen too often, but it'll be useful to people making custom levels so they know that it can happen, when it does. --- desktop_version/src/Graphics.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/desktop_version/src/Graphics.cpp b/desktop_version/src/Graphics.cpp index 36f5091a..55e852c7 100644 --- a/desktop_version/src/Graphics.cpp +++ b/desktop_version/src/Graphics.cpp @@ -1143,6 +1143,7 @@ void Graphics::textboxtimer( int t ) { if (!INBOUNDS(m, textbox)) { + puts("textboxtimer() out-of-bounds!"); return; } @@ -1153,6 +1154,7 @@ void Graphics::addline( std::string t ) { if (!INBOUNDS(m, textbox)) { + puts("addline() out-of-bounds!"); return; } @@ -1163,6 +1165,7 @@ void Graphics::textboxadjust() { if (!INBOUNDS(m, textbox)) { + puts("textboxadjust() out-of-bounds!"); return; } @@ -2804,6 +2807,7 @@ void Graphics::textboxcenter() { if (!INBOUNDS(m, textbox)) { + puts("textboxcenter() out-of-bounds!"); return; } @@ -2815,6 +2819,7 @@ void Graphics::textboxcenterx() { if (!INBOUNDS(m, textbox)) { + puts("textboxcenterx() out-of-bounds!"); return; } @@ -2825,6 +2830,7 @@ int Graphics::textboxwidth() { if (!INBOUNDS(m, textbox)) { + puts("textboxwidth() out-of-bounds!"); return 0; } @@ -2835,6 +2841,7 @@ void Graphics::textboxmove(int xo, int yo) { if (!INBOUNDS(m, textbox)) { + puts("textboxmove() out-of-bounds!"); return; } @@ -2846,6 +2853,7 @@ void Graphics::textboxmoveto(int xo) { if (!INBOUNDS(m, textbox)) { + puts("textboxmoveto() out-of-bounds!"); return; } @@ -2856,6 +2864,7 @@ void Graphics::textboxcentery() { if (!INBOUNDS(m, textbox)) { + puts("textboxcentery() out-of-bounds!"); return; }