--- old/din-57.tar.gz +++ din-57.tar.gz ├── din-57.tar │ ├── file list │ │ @@ -1,17 +1,17 @@ │ │ -drwxr-xr-x 0 1000 1000 0 2023-07-20 02:59:19.000000 din-57/ │ │ -drwxr-xr-x 0 1000 1000 0 2023-07-20 02:59:19.000000 din-57/pixmaps/ │ │ +drwxr-xr-x 0 1000 1000 0 2023-07-22 15:13:32.000000 din-57/ │ │ +drwxr-xr-x 0 1000 1000 0 2023-07-22 15:13:32.000000 din-57/pixmaps/ │ │ -rw-r--r-- 0 1000 1000 3346 2023-06-21 05:25:16.000000 din-57/pixmaps/din.svg │ │ -rw-r--r-- 0 1000 1000 179 2023-06-21 05:25:16.000000 din-57/pixmaps/din.desktop │ │ -rw-r--r-- 0 1000 1000 919 2023-06-21 05:25:16.000000 din-57/pixmaps/din.png │ │ -rw-r--r-- 0 1000 1000 15491 2023-07-19 20:44:05.000000 din-57/pixmaps/Makefile.in │ │ -rw-r--r-- 0 1000 1000 308 2023-06-21 05:25:16.000000 din-57/pixmaps/Makefile.am │ │ -drwxr-xr-x 0 1000 1000 0 2023-07-20 02:59:17.000000 din-57/src/ │ │ -drwxr-xr-x 0 1000 1000 0 2023-07-20 02:59:18.000000 din-57/src/factory/ │ │ -drwxr-xr-x 0 1000 1000 0 2023-07-20 02:59:19.000000 din-57/src/factory/country/ │ │ +drwxr-xr-x 0 1000 1000 0 2023-07-22 15:13:30.000000 din-57/src/ │ │ +drwxr-xr-x 0 1000 1000 0 2023-07-22 15:13:31.000000 din-57/src/factory/ │ │ +drwxr-xr-x 0 1000 1000 0 2023-07-22 15:13:32.000000 din-57/src/factory/country/ │ │ -rw-r--r-- 0 1000 1000 11653 2023-06-21 05:25:17.000000 din-57/src/factory/country/zimbabwe │ │ -rw-r--r-- 0 1000 1000 19690 2023-06-21 05:25:17.000000 din-57/src/factory/country/zambia │ │ -rw-r--r-- 0 1000 1000 12835 2023-06-21 05:25:17.000000 din-57/src/factory/country/yemen │ │ -rw-r--r-- 0 1000 1000 6510 2023-06-21 05:25:17.000000 din-57/src/factory/country/western_sahara │ │ -rw-r--r-- 0 1000 1000 827 2023-06-21 05:25:17.000000 din-57/src/factory/country/wallis_and_futuna_islands │ │ -rw-r--r-- 0 1000 1000 50233 2023-06-21 05:25:17.000000 din-57/src/factory/country/vietnam │ │ -rw-r--r-- 0 1000 1000 45292 2023-06-21 05:25:17.000000 din-57/src/factory/country/venezuela │ │ @@ -595,15 +595,15 @@ │ │ -rw-r--r-- 0 1000 1000 1584 2023-06-21 05:25:17.000000 din-57/src/hit.h │ │ -rw-r--r-- 0 1000 1000 397 2023-06-21 05:25:17.000000 din-57/src/help.h │ │ -rw-r--r-- 0 1000 1000 2254 2023-07-07 04:38:08.000000 din-57/src/gravity.h │ │ -rw-r--r-- 0 1000 1000 510 2023-06-21 05:25:17.000000 din-57/src/glyph.h │ │ -rw-r--r-- 0 1000 1000 1123 2023-07-17 06:09:47.000000 din-57/src/globals.h │ │ -rw-r--r-- 0 1000 1000 350 2023-06-21 05:25:17.000000 din-57/src/funktion.h │ │ -rw-r--r-- 0 1000 1000 1252 2023-06-21 05:25:17.000000 din-57/src/fractaliser.h │ │ --rw-r--r-- 0 1000 1000 2246 2023-07-06 14:50:51.000000 din-57/src/font.h │ │ +-rw-r--r-- 0 1000 1000 2192 2023-07-22 14:29:26.000000 din-57/src/font.h │ │ -rw-r--r-- 0 1000 1000 1393 2023-06-21 05:25:17.000000 din-57/src/font_editor.h │ │ -rw-r--r-- 0 1000 1000 434 2023-06-21 05:25:17.000000 din-57/src/filled_button.h │ │ -rw-r--r-- 0 1000 1000 710 2023-06-21 05:25:17.000000 din-57/src/file-utils.h │ │ -rw-r--r-- 0 1000 1000 2149 2023-06-21 05:25:17.000000 din-57/src/field.h │ │ -rw-r--r-- 0 1000 1000 1128 2023-06-21 05:25:17.000000 din-57/src/fft.h │ │ -rw-r--r-- 0 1000 1000 941 2023-06-21 05:25:17.000000 din-57/src/fader.h │ │ -rw-r--r-- 0 1000 1000 8832 2023-07-11 00:29:56.000000 din-57/src/drone.h │ │ @@ -714,18 +714,18 @@ │ │ -rw-r--r-- 0 1000 1000 16606 2023-07-17 16:20:57.000000 din-57/src/keyboard_keyboard.cc │ │ -rw-r--r-- 0 1000 1000 3342 2023-06-21 05:25:17.000000 din-57/src/item_list.cc │ │ -rw-r--r-- 0 1000 1000 473 2023-07-17 17:24:32.000000 din-57/src/instrument.cc │ │ -rw-r--r-- 0 1000 1000 1470 2023-06-21 05:25:17.000000 din-57/src/hit.cc │ │ -rw-r--r-- 0 1000 1000 821 2023-06-21 05:25:17.000000 din-57/src/help.cc │ │ -rw-r--r-- 0 1000 1000 9504 2023-07-07 05:17:14.000000 din-57/src/gravity.cc │ │ -rw-r--r-- 0 1000 1000 1031 2023-06-21 05:25:17.000000 din-57/src/glyph.cc │ │ --rw-r--r-- 0 1000 1000 2724 2023-06-21 05:25:17.000000 din-57/src/globals.cc │ │ +-rw-r--r-- 0 1000 1000 2724 2023-07-20 16:44:46.000000 din-57/src/globals.cc │ │ -rw-r--r-- 0 1000 1000 6262 2023-06-21 05:25:17.000000 din-57/src/fractaliser.cc │ │ -rw-r--r-- 0 1000 1000 5473 2023-07-06 15:45:36.000000 din-57/src/font_editor.cc │ │ --rw-r--r-- 0 1000 1000 9621 2023-07-14 05:57:08.000000 din-57/src/font.cc │ │ +-rw-r--r-- 0 1000 1000 9035 2023-07-22 14:37:23.000000 din-57/src/font.cc │ │ -rw-r--r-- 0 1000 1000 289 2023-06-21 05:25:17.000000 din-57/src/filled_button.cc │ │ -rw-r--r-- 0 1000 1000 5730 2023-06-21 05:25:17.000000 din-57/src/field.cc │ │ -rw-r--r-- 0 1000 1000 2389 2023-06-21 05:25:17.000000 din-57/src/fft.cc │ │ -rw-r--r-- 0 1000 1000 1988 2023-06-21 05:25:17.000000 din-57/src/fader.cc │ │ -rw-r--r-- 0 1000 1000 41116 2023-07-17 17:30:45.000000 din-57/src/eval.cc │ │ -rw-r--r-- 0 1000 1000 9712 2023-07-11 00:33:50.000000 din-57/src/drone.cc │ │ -rw-r--r-- 0 1000 1000 714 2023-06-21 05:25:17.000000 din-57/src/drawrrow.cc │ ├── din-57/src/font.h │ │ @@ -55,15 +55,14 @@ │ │ const std::string& filename () const { return fname;} │ │ │ │ int char_width (char c); │ │ int char_height (char c); │ │ void calc_line_height (); │ │ │ │ void draw_char (char c, int x, int y, int z = 0); │ │ - void draw_charz (char c, int x, int y, int z = 1); │ │ │ │ const std::map& get_chars (); │ │ void set_chars (const std::map& chars); │ │ │ │ #ifdef __SVG_OUT__ │ │ std::ofstream svg; │ │ void write_char (char c, int x, int y, int z = 0); │ ├── din-57/src/font.cc │ │ @@ -7,14 +7,17 @@ │ │ │ │ │ │ #include │ │ #include │ │ #include │ │ #include "font.h" │ │ #include "log.h" │ │ +#include "random.h" │ │ +#include "chrono.h" │ │ + │ │ using namespace std; │ │ │ │ extern string user_data_dir; │ │ static const char eol = '\n'; │ │ │ │ font::font (const string& filename) : mod(0) │ │ │ │ @@ -188,18 +191,18 @@ │ │ │ │ } │ │ │ │ int font::char_width (char c) { return characters[c].width;} │ │ int font::char_height (char c) { return characters[c].height;} │ │ │ │ void font::draw_char (char c, int x, int y, int z) { │ │ - glyph& gl = characters[c]; │ │ - vector& lines = gl.lines; │ │ static const int MAX_LINE_POINTS = 32; // cant exceed or crash! │ │ static int pts [3 * MAX_LINE_POINTS] = {0}; │ │ + glyph& gl = characters[c]; │ │ + vector& lines = gl.lines; │ │ glVertexPointer (3, GL_INT, 0, pts); │ │ for (int i = 0; i < gl.nln; ++i) { │ │ line& li = lines[i]; │ │ vector< point >& points = li.points; │ │ int q = 0, npts = li.npts; │ │ for (int j = 0; j < npts; ++j) { │ │ const point& p = points[j]; │ │ @@ -207,36 +210,14 @@ │ │ pts[q++] = y + p.y; │ │ pts[q++] = z; │ │ } │ │ glDrawArrays (GL_LINE_STRIP, 0, npts); │ │ } │ │ } │ │ │ │ -void font::draw_charz (char c, int x, int y, int z) { │ │ - glyph& gl = characters[c]; │ │ - vector& lines = gl.lines; │ │ - static const int MAX_LINE_POINTS = 64; // cant exceed or crash! │ │ - static int pts [3 * MAX_LINE_POINTS] = {0}; │ │ - glVertexPointer (3, GL_INT, 0, pts); │ │ - for (int i = 0; i < gl.nln; ++i) { │ │ - line& li = lines[i]; │ │ - vector< point >& points = li.points; │ │ - int q = 0, npts = li.npts; │ │ - for (int j = 0; j < npts; ++j) { │ │ - const point& p = points[j]; │ │ - pts[q++] = x + p.x * z; │ │ - pts[q++] = y + p.y * z - 2 * z; │ │ - pts[q++] = 0; │ │ - } │ │ - glDrawArrays (GL_LINE_STRIP, 0, npts); │ │ - } │ │ -} │ │ - │ │ - │ │ - │ │ int draw_string (const string& s, int x, int y, int z) { │ │ char prevc = ' '; │ │ for (int p = 0, q = s.length(); p < q; ++p) { │ │ char c = s[p]; │ │ if (c == ' ') x += fnt.spacing.word; else { │ │ x += fnt.kern[prevc][c]; │ │ fnt.draw_char (c, x, y, z);