From: chaoskagami Date: Tue, 23 Sep 2014 03:29:39 +0000 (-0400) Subject: Made a miscellaneous change; font size and spacing are now DataContainer vars X-Git-Url: https://chaos.moe/g/?a=commitdiff_plain;h=1bd3a1890cb55ac844b1b24dc5beb8813cb61826;p=vn%2Fvndc.git Made a miscellaneous change; font size and spacing are now DataContainer vars --- diff --git a/bin/vndc.x86_64 b/bin/vndc.x86_64 new file mode 100755 index 0000000..7f8ea8d Binary files /dev/null and b/bin/vndc.x86_64 differ diff --git a/vndc/include/Data.hpp b/vndc/include/Data.hpp index 6758d34..7bf4fab 100644 --- a/vndc/include/Data.hpp +++ b/vndc/include/Data.hpp @@ -20,6 +20,8 @@ class DataContainer { int render_y1; int render_x2; int render_y2; + int text_gap; + int text_size; int text_x; int text_y; std::map *s_flags; diff --git a/vndc/include/gitrev.hpp b/vndc/include/gitrev.hpp index 4c7297c..fde0a33 100644 --- a/vndc/include/gitrev.hpp +++ b/vndc/include/gitrev.hpp @@ -1,5 +1,5 @@ #ifndef GIT_REV_HDR #define GIT_REV_HDR -#define GIT_REV "256da2f3a0597798795d1e838783d74a2e1d4f41" +#define GIT_REV "5ffbbb9138bc91e95291e2f89f3fbf30e8b33d91" #endif diff --git a/vndc/src/Data.cpp b/vndc/src/Data.cpp index 329a30b..71b1dc9 100644 --- a/vndc/src/Data.cpp +++ b/vndc/src/Data.cpp @@ -19,6 +19,8 @@ DataContainer::DataContainer() { render_y2 = screen_h / 15 * 13; text_x = render_x1; text_y = render_y1; + text_gap = 35; + text_size = 24; jumped = false; choice_coords = NULL; choices = 0; diff --git a/vndc/src/Loop.cpp b/vndc/src/Loop.cpp index cb47edd..87544f6 100644 --- a/vndc/src/Loop.cpp +++ b/vndc/src/Loop.cpp @@ -55,7 +55,7 @@ void Setup() { GetData()->s_flags = new std::map(); // Font - GetData()->ctx->Text()->LoadFont((char*)"default.ttf", 24); + GetData()->ctx->Text()->LoadFont((char*)"default.ttf", GetData()->text_size); GetData()->ctx->Text()->SetFontUsed(1); GetData()->ctx->Text()->Outline(1); diff --git a/vndc/src/op_text.cpp b/vndc/src/op_text.cpp index 6b3be61..87aa3ca 100644 --- a/vndc/src/op_text.cpp +++ b/vndc/src/op_text.cpp @@ -102,13 +102,13 @@ void op_text(char* string) { ++lines; } - if( ( lines * 35 + GetData()->text_y ) > GetData()->render_y2 ) + if( ( lines * GetData()->text_gap + GetData()->text_y ) > GetData()->render_y2 ) op_cleartext(); for(int i=0; i < lines; i++) { //printf("[br] %s\n", ptrs[i]); txt->Render(ptrs[i], GetData()->text_x, GetData()->text_y); - GetData()->text_y += 35; + GetData()->text_y += GetData()->text_gap; } free(ptrs); @@ -116,7 +116,7 @@ void op_text(char* string) { } else { txt->Render(string, GetData()->text_x, GetData()->text_y); - GetData()->text_y += 35; + GetData()->text_y += GetData()->text_gap; } if(!noclick) {