Exposed the font character size and SDLTest_DrawCharacter() to make it easier to do custom debug text layout
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211
diff --git a/include/SDL_test_font.h b/include/SDL_test_font.h
index dd19f07..8d51d4a 100644
--- a/include/SDL_test_font.h
+++ b/include/SDL_test_font.h
@@ -38,6 +38,20 @@ extern "C" {
/* Function prototypes */
+#define FONT_CHARACTER_SIZE 8
+
+/**
+ * \brief Draw a string in the currently set font.
+ *
+ * \param renderer The renderer to draw on.
+ * \param x The X coordinate of the upper left corner of the character.
+ * \param y The Y coordinate of the upper left corner of the character.
+ * \param c The character to draw.
+ *
+ * \returns Returns 0 on success, -1 on failure.
+ */
+int SDLTest_DrawCharacter( SDL_Renderer *renderer, int x, int y, char c );
+
/**
* \brief Draw a string in the currently set font.
*
@@ -48,7 +62,7 @@ extern "C" {
*
* \returns Returns 0 on success, -1 on failure.
*/
-int SDLTest_DrawString(SDL_Renderer * renderer, int x, int y, const char *s);
+int SDLTest_DrawString( SDL_Renderer * renderer, int x, int y, const char *s );
/* Ends C function definitions when using C++ */
diff --git a/src/test/SDL_test_font.c b/src/test/SDL_test_font.c
index 9e419e3..a6bc40c 100644
--- a/src/test/SDL_test_font.c
+++ b/src/test/SDL_test_font.c
@@ -1569,7 +1569,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 128 0x80 '�'
+ * 128 0x80 ''
*/
0x7c, /* 01111100 */
0xc6, /* 11000110 */
@@ -1581,7 +1581,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x78, /* 01111000 */
/*
- * 129 0x81 '�'
+ * 129 0x81 ''
*/
0xcc, /* 11001100 */
0x00, /* 00000000 */
@@ -1593,7 +1593,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 130 0x82 '�'
+ * 130 0x82 ''
*/
0x0c, /* 00001100 */
0x18, /* 00011000 */
@@ -1605,7 +1605,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 131 0x83 '�'
+ * 131 0x83 ''
*/
0x7c, /* 01111100 */
0x82, /* 10000010 */
@@ -1617,7 +1617,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 132 0x84 '�'
+ * 132 0x84 ''
*/
0xc6, /* 11000110 */
0x00, /* 00000000 */
@@ -1629,7 +1629,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 133 0x85 '�'
+ * 133 0x85 ''
*/
0x30, /* 00110000 */
0x18, /* 00011000 */
@@ -1641,7 +1641,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 134 0x86 '�'
+ * 134 0x86 ''
*/
0x30, /* 00110000 */
0x30, /* 00110000 */
@@ -1653,7 +1653,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 135 0x87 '�'
+ * 135 0x87 ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -1665,7 +1665,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x38, /* 00111000 */
/*
- * 136 0x88 '�'
+ * 136 0x88 ''
*/
0x7c, /* 01111100 */
0x82, /* 10000010 */
@@ -1677,7 +1677,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 137 0x89 '�'
+ * 137 0x89 ''
*/
0xc6, /* 11000110 */
0x00, /* 00000000 */
@@ -1689,7 +1689,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 138 0x8a '�'
+ * 138 0x8a ''
*/
0x30, /* 00110000 */
0x18, /* 00011000 */
@@ -1701,7 +1701,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 139 0x8b '�'
+ * 139 0x8b ''
*/
0x66, /* 01100110 */
0x00, /* 00000000 */
@@ -1713,7 +1713,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 140 0x8c '�'
+ * 140 0x8c ''
*/
0x7c, /* 01111100 */
0x82, /* 10000010 */
@@ -1725,7 +1725,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 141 0x8d '�'
+ * 141 0x8d ''
*/
0x30, /* 00110000 */
0x18, /* 00011000 */
@@ -1737,7 +1737,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 142 0x8e '�'
+ * 142 0x8e ''
*/
0xc6, /* 11000110 */
0x38, /* 00111000 */
@@ -1749,7 +1749,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 143 0x8f '�'
+ * 143 0x8f ''
*/
0x38, /* 00111000 */
0x6c, /* 01101100 */
@@ -1761,7 +1761,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 144 0x90 '�'
+ * 144 0x90 ''
*/
0x18, /* 00011000 */
0x30, /* 00110000 */
@@ -1773,7 +1773,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 145 0x91 '�'
+ * 145 0x91 ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -1785,7 +1785,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 146 0x92 '�'
+ * 146 0x92 ''
*/
0x3e, /* 00111110 */
0x6c, /* 01101100 */
@@ -1797,7 +1797,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 147 0x93 '�'
+ * 147 0x93 ''
*/
0x7c, /* 01111100 */
0x82, /* 10000010 */
@@ -1809,7 +1809,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 148 0x94 '�'
+ * 148 0x94 ''
*/
0xc6, /* 11000110 */
0x00, /* 00000000 */
@@ -1821,7 +1821,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 149 0x95 '�'
+ * 149 0x95 ''
*/
0x30, /* 00110000 */
0x18, /* 00011000 */
@@ -1833,7 +1833,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 150 0x96 '�'
+ * 150 0x96 ''
*/
0x78, /* 01111000 */
0x84, /* 10000100 */
@@ -1845,7 +1845,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 151 0x97 '�'
+ * 151 0x97 ''
*/
0x60, /* 01100000 */
0x30, /* 00110000 */
@@ -1857,7 +1857,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 152 0x98 '�'
+ * 152 0x98 ''
*/
0xc6, /* 11000110 */
0x00, /* 00000000 */
@@ -1869,7 +1869,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0xfc, /* 11111100 */
/*
- * 153 0x99 '�'
+ * 153 0x99 ''
*/
0xc6, /* 11000110 */
0x38, /* 00111000 */
@@ -1881,7 +1881,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 154 0x9a '�'
+ * 154 0x9a ''
*/
0xc6, /* 11000110 */
0x00, /* 00000000 */
@@ -1893,7 +1893,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 155 0x9b '�'
+ * 155 0x9b ''
*/
0x18, /* 00011000 */
0x18, /* 00011000 */
@@ -1905,7 +1905,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x18, /* 00011000 */
/*
- * 156 0x9c '�'
+ * 156 0x9c ''
*/
0x38, /* 00111000 */
0x6c, /* 01101100 */
@@ -1917,7 +1917,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 157 0x9d '�'
+ * 157 0x9d ''
*/
0x66, /* 01100110 */
0x66, /* 01100110 */
@@ -1929,7 +1929,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x18, /* 00011000 */
/*
- * 158 0x9e '�'
+ * 158 0x9e ''
*/
0xf8, /* 11111000 */
0xcc, /* 11001100 */
@@ -1941,7 +1941,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0xc7, /* 11000111 */
/*
- * 159 0x9f '�'
+ * 159 0x9f ''
*/
0x0e, /* 00001110 */
0x1b, /* 00011011 */
@@ -1953,7 +1953,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 160 0xa0 '�'
+ * 160 0xa0 ''
*/
0x18, /* 00011000 */
0x30, /* 00110000 */
@@ -1965,7 +1965,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 161 0xa1 '�'
+ * 161 0xa1 ''
*/
0x0c, /* 00001100 */
0x18, /* 00011000 */
@@ -1977,7 +1977,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 162 0xa2 '�'
+ * 162 0xa2 ''
*/
0x0c, /* 00001100 */
0x18, /* 00011000 */
@@ -1989,7 +1989,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 163 0xa3 '�'
+ * 163 0xa3 ''
*/
0x18, /* 00011000 */
0x30, /* 00110000 */
@@ -2001,7 +2001,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 164 0xa4 '�'
+ * 164 0xa4 ''
*/
0x76, /* 01110110 */
0xdc, /* 11011100 */
@@ -2013,7 +2013,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 165 0xa5 '�'
+ * 165 0xa5 ''
*/
0x76, /* 01110110 */
0xdc, /* 11011100 */
@@ -2025,7 +2025,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 166 0xa6 '�'
+ * 166 0xa6 ''
*/
0x3c, /* 00111100 */
0x6c, /* 01101100 */
@@ -2037,7 +2037,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 167 0xa7 '�'
+ * 167 0xa7 ''
*/
0x38, /* 00111000 */
0x6c, /* 01101100 */
@@ -2049,7 +2049,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 168 0xa8 '�'
+ * 168 0xa8 ''
*/
0x18, /* 00011000 */
0x00, /* 00000000 */
@@ -2061,7 +2061,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 169 0xa9 '�'
+ * 169 0xa9 ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -2073,7 +2073,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 170 0xaa '�'
+ * 170 0xaa ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -2085,7 +2085,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 171 0xab '�'
+ * 171 0xab ''
*/
0x63, /* 01100011 */
0xe6, /* 11100110 */
@@ -2097,7 +2097,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x0f, /* 00001111 */
/*
- * 172 0xac '�'
+ * 172 0xac ''
*/
0x63, /* 01100011 */
0xe6, /* 11100110 */
@@ -2109,7 +2109,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x06, /* 00000110 */
/*
- * 173 0xad '�'
+ * 173 0xad ''
*/
0x18, /* 00011000 */
0x00, /* 00000000 */
@@ -2121,7 +2121,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 174 0xae '�'
+ * 174 0xae ''
*/
0x00, /* 00000000 */
0x33, /* 00110011 */
@@ -2133,7 +2133,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 175 0xaf '�'
+ * 175 0xaf ''
*/
0x00, /* 00000000 */
0xcc, /* 11001100 */
@@ -2145,7 +2145,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 176 0xb0 '�'
+ * 176 0xb0 ''
*/
0x22, /* 00100010 */
0x88, /* 10001000 */
@@ -2157,7 +2157,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x88, /* 10001000 */
/*
- * 177 0xb1 '�'
+ * 177 0xb1 ''
*/
0x55, /* 01010101 */
0xaa, /* 10101010 */
@@ -2169,7 +2169,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0xaa, /* 10101010 */
/*
- * 178 0xb2 '�'
+ * 178 0xb2 ''
*/
0x77, /* 01110111 */
0xdd, /* 11011101 */
@@ -2181,7 +2181,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0xdd, /* 11011101 */
/*
- * 179 0xb3 '�'
+ * 179 0xb3 ''
*/
0x18, /* 00011000 */
0x18, /* 00011000 */
@@ -2193,7 +2193,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x18, /* 00011000 */
/*
- * 180 0xb4 '�'
+ * 180 0xb4 ''
*/
0x18, /* 00011000 */
0x18, /* 00011000 */
@@ -2205,7 +2205,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x18, /* 00011000 */
/*
- * 181 0xb5 '�'
+ * 181 0xb5 ''
*/
0x18, /* 00011000 */
0x18, /* 00011000 */
@@ -2217,7 +2217,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x18, /* 00011000 */
/*
- * 182 0xb6 '�'
+ * 182 0xb6 ''
*/
0x36, /* 00110110 */
0x36, /* 00110110 */
@@ -2229,7 +2229,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x36, /* 00110110 */
/*
- * 183 0xb7 '�'
+ * 183 0xb7 ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -2241,7 +2241,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x36, /* 00110110 */
/*
- * 184 0xb8 '�'
+ * 184 0xb8 ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -2253,7 +2253,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x18, /* 00011000 */
/*
- * 185 0xb9 '�'
+ * 185 0xb9 ''
*/
0x36, /* 00110110 */
0x36, /* 00110110 */
@@ -2265,7 +2265,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x36, /* 00110110 */
/*
- * 186 0xba '�'
+ * 186 0xba ''
*/
0x36, /* 00110110 */
0x36, /* 00110110 */
@@ -2277,7 +2277,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x36, /* 00110110 */
/*
- * 187 0xbb '�'
+ * 187 0xbb ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -2289,7 +2289,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x36, /* 00110110 */
/*
- * 188 0xbc '�'
+ * 188 0xbc ''
*/
0x36, /* 00110110 */
0x36, /* 00110110 */
@@ -2301,7 +2301,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 189 0xbd '�'
+ * 189 0xbd ''
*/
0x36, /* 00110110 */
0x36, /* 00110110 */
@@ -2313,7 +2313,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 190 0xbe '�'
+ * 190 0xbe ''
*/
0x18, /* 00011000 */
0x18, /* 00011000 */
@@ -2325,7 +2325,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 191 0xbf '�'
+ * 191 0xbf ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -2337,7 +2337,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x18, /* 00011000 */
/*
- * 192 0xc0 '�'
+ * 192 0xc0 ''
*/
0x18, /* 00011000 */
0x18, /* 00011000 */
@@ -2349,7 +2349,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 193 0xc1 '�'
+ * 193 0xc1 ''
*/
0x18, /* 00011000 */
0x18, /* 00011000 */
@@ -2361,7 +2361,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 194 0xc2 '�'
+ * 194 0xc2 ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -2373,7 +2373,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x18, /* 00011000 */
/*
- * 195 0xc3 '�'
+ * 195 0xc3 ''
*/
0x18, /* 00011000 */
0x18, /* 00011000 */
@@ -2385,7 +2385,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x18, /* 00011000 */
/*
- * 196 0xc4 '�'
+ * 196 0xc4 ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -2397,7 +2397,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 197 0xc5 '�'
+ * 197 0xc5 ''
*/
0x18, /* 00011000 */
0x18, /* 00011000 */
@@ -2409,7 +2409,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x18, /* 00011000 */
/*
- * 198 0xc6 '�'
+ * 198 0xc6 ''
*/
0x18, /* 00011000 */
0x18, /* 00011000 */
@@ -2421,7 +2421,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x18, /* 00011000 */
/*
- * 199 0xc7 '�'
+ * 199 0xc7 ''
*/
0x36, /* 00110110 */
0x36, /* 00110110 */
@@ -2433,7 +2433,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x36, /* 00110110 */
/*
- * 200 0xc8 '�'
+ * 200 0xc8 ''
*/
0x36, /* 00110110 */
0x36, /* 00110110 */
@@ -2445,7 +2445,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 201 0xc9 '�'
+ * 201 0xc9 ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -2457,7 +2457,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x36, /* 00110110 */
/*
- * 202 0xca '�'
+ * 202 0xca ''
*/
0x36, /* 00110110 */
0x36, /* 00110110 */
@@ -2469,7 +2469,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 203 0xcb '�'
+ * 203 0xcb ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -2481,7 +2481,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x36, /* 00110110 */
/*
- * 204 0xcc '�'
+ * 204 0xcc ''
*/
0x36, /* 00110110 */
0x36, /* 00110110 */
@@ -2493,7 +2493,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x36, /* 00110110 */
/*
- * 205 0xcd '�'
+ * 205 0xcd ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -2505,7 +2505,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 206 0xce '�'
+ * 206 0xce ''
*/
0x36, /* 00110110 */
0x36, /* 00110110 */
@@ -2517,7 +2517,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x36, /* 00110110 */
/*
- * 207 0xcf '�'
+ * 207 0xcf ''
*/
0x18, /* 00011000 */
0x18, /* 00011000 */
@@ -2529,7 +2529,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 208 0xd0 '�'
+ * 208 0xd0 ''
*/
0x36, /* 00110110 */
0x36, /* 00110110 */
@@ -2541,7 +2541,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 209 0xd1 '�'
+ * 209 0xd1 ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -2553,7 +2553,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x18, /* 00011000 */
/*
- * 210 0xd2 '�'
+ * 210 0xd2 ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -2565,7 +2565,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x36, /* 00110110 */
/*
- * 211 0xd3 '�'
+ * 211 0xd3 ''
*/
0x36, /* 00110110 */
0x36, /* 00110110 */
@@ -2577,7 +2577,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 212 0xd4 '�'
+ * 212 0xd4 ''
*/
0x18, /* 00011000 */
0x18, /* 00011000 */
@@ -2589,7 +2589,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 213 0xd5 '�'
+ * 213 0xd5 ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -2601,7 +2601,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x18, /* 00011000 */
/*
- * 214 0xd6 '�'
+ * 214 0xd6 ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -2613,7 +2613,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x36, /* 00110110 */
/*
- * 215 0xd7 '�'
+ * 215 0xd7 ''
*/
0x36, /* 00110110 */
0x36, /* 00110110 */
@@ -2625,7 +2625,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x36, /* 00110110 */
/*
- * 216 0xd8 '�'
+ * 216 0xd8 ''
*/
0x18, /* 00011000 */
0x18, /* 00011000 */
@@ -2637,7 +2637,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x18, /* 00011000 */
/*
- * 217 0xd9 '�'
+ * 217 0xd9 ''
*/
0x18, /* 00011000 */
0x18, /* 00011000 */
@@ -2649,7 +2649,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 218 0xda '�'
+ * 218 0xda ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -2661,7 +2661,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x18, /* 00011000 */
/*
- * 219 0xdb '�'
+ * 219 0xdb ''
*/
0xff, /* 11111111 */
0xff, /* 11111111 */
@@ -2673,7 +2673,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0xff, /* 11111111 */
/*
- * 220 0xdc '�'
+ * 220 0xdc ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -2685,7 +2685,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0xff, /* 11111111 */
/*
- * 221 0xdd '�'
+ * 221 0xdd ''
*/
0xf0, /* 11110000 */
0xf0, /* 11110000 */
@@ -2697,7 +2697,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0xf0, /* 11110000 */
/*
- * 222 0xde '�'
+ * 222 0xde ''
*/
0x0f, /* 00001111 */
0x0f, /* 00001111 */
@@ -2709,7 +2709,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x0f, /* 00001111 */
/*
- * 223 0xdf '�'
+ * 223 0xdf ''
*/
0xff, /* 11111111 */
0xff, /* 11111111 */
@@ -2721,7 +2721,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 224 0xe0 '�'
+ * 224 0xe0 ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -2733,7 +2733,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 225 0xe1 '�'
+ * 225 0xe1 ''
*/
0x78, /* 01111000 */
0xcc, /* 11001100 */
@@ -2745,7 +2745,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 226 0xe2 '�'
+ * 226 0xe2 ''
*/
0xfe, /* 11111110 */
0xc6, /* 11000110 */
@@ -2757,7 +2757,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 227 0xe3 '�'
+ * 227 0xe3 ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -2769,7 +2769,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 228 0xe4 '�'
+ * 228 0xe4 ''
*/
0xfe, /* 11111110 */
0xc6, /* 11000110 */
@@ -2781,7 +2781,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 229 0xe5 '�'
+ * 229 0xe5 ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -2793,7 +2793,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 230 0xe6 '�'
+ * 230 0xe6 ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -2805,7 +2805,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0xc0, /* 11000000 */
/*
- * 231 0xe7 '�'
+ * 231 0xe7 ''
*/
0x00, /* 00000000 */
0x76, /* 01110110 */
@@ -2817,7 +2817,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 232 0xe8 '�'
+ * 232 0xe8 ''
*/
0x7e, /* 01111110 */
0x18, /* 00011000 */
@@ -2829,7 +2829,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x7e, /* 01111110 */
/*
- * 233 0xe9 '�'
+ * 233 0xe9 ''
*/
0x38, /* 00111000 */
0x6c, /* 01101100 */
@@ -2841,7 +2841,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 234 0xea '�'
+ * 234 0xea ''
*/
0x38, /* 00111000 */
0x6c, /* 01101100 */
@@ -2853,7 +2853,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 235 0xeb '�'
+ * 235 0xeb ''
*/
0x0e, /* 00001110 */
0x18, /* 00011000 */
@@ -2865,7 +2865,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 236 0xec '�'
+ * 236 0xec ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -2877,7 +2877,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 237 0xed '�'
+ * 237 0xed ''
*/
0x06, /* 00000110 */
0x0c, /* 00001100 */
@@ -2889,7 +2889,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0xc0, /* 11000000 */
/*
- * 238 0xee '�'
+ * 238 0xee ''
*/
0x1e, /* 00011110 */
0x30, /* 00110000 */
@@ -2901,7 +2901,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 239 0xef '�'
+ * 239 0xef ''
*/
0x00, /* 00000000 */
0x7c, /* 01111100 */
@@ -2913,7 +2913,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 240 0xf0 '�'
+ * 240 0xf0 ''
*/
0x00, /* 00000000 */
0xfe, /* 11111110 */
@@ -2925,7 +2925,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 241 0xf1 '�'
+ * 241 0xf1 ''
*/
0x18, /* 00011000 */
0x18, /* 00011000 */
@@ -2937,7 +2937,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 242 0xf2 '�'
+ * 242 0xf2 ''
*/
0x30, /* 00110000 */
0x18, /* 00011000 */
@@ -2949,7 +2949,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 243 0xf3 '�'
+ * 243 0xf3 ''
*/
0x0c, /* 00001100 */
0x18, /* 00011000 */
@@ -2961,7 +2961,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 244 0xf4 '�'
+ * 244 0xf4 ''
*/
0x0e, /* 00001110 */
0x1b, /* 00011011 */
@@ -2973,7 +2973,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x18, /* 00011000 */
/*
- * 245 0xf5 '�'
+ * 245 0xf5 ''
*/
0x18, /* 00011000 */
0x18, /* 00011000 */
@@ -2985,7 +2985,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x70, /* 01110000 */
/*
- * 246 0xf6 '�'
+ * 246 0xf6 ''
*/
0x00, /* 00000000 */
0x18, /* 00011000 */
@@ -2997,7 +2997,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 247 0xf7 '�'
+ * 247 0xf7 ''
*/
0x00, /* 00000000 */
0x76, /* 01110110 */
@@ -3009,7 +3009,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 248 0xf8 '�'
+ * 248 0xf8 ''
*/
0x38, /* 00111000 */
0x6c, /* 01101100 */
@@ -3021,7 +3021,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 249 0xf9 '�'
+ * 249 0xf9 ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -3033,7 +3033,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 250 0xfa '�'
+ * 250 0xfa ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -3045,7 +3045,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 251 0xfb '�'
+ * 251 0xfb ''
*/
0x0f, /* 00001111 */
0x0c, /* 00001100 */
@@ -3057,7 +3057,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x1c, /* 00011100 */
/*
- * 252 0xfc '�'
+ * 252 0xfc ''
*/
0x6c, /* 01101100 */
0x36, /* 00110110 */
@@ -3069,7 +3069,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 253 0xfd '�'
+ * 253 0xfd ''
*/
0x78, /* 01111000 */
0x0c, /* 00001100 */
@@ -3081,7 +3081,7 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
0x00, /* 00000000 */
/*
- * 254 0xfe '�'
+ * 254 0xfe ''
*/
0x00, /* 00000000 */
0x00, /* 00000000 */
@@ -3109,16 +3109,16 @@ static unsigned char SDLTest_FontData[SDL_TESTFONTDATAMAX] = {
/* ---- Character */
-/* !
+/*!
\brief Global cache for 8x8 pixel font textures created at runtime.
*/
static SDL_Texture *SDLTest_CharTextureCache[256];
int SDLTest_DrawCharacter(SDL_Renderer *renderer, int x, int y, char c)
{
- const Uint32 charWidth = 8;
- const Uint32 charHeight = 8;
- const Uint32 charSize = 8;
+ const Uint32 charWidth = FONT_CHARACTER_SIZE;
+ const Uint32 charHeight = FONT_CHARACTER_SIZE;
+ const Uint32 charSize = FONT_CHARACTER_SIZE;
SDL_Rect srect;
SDL_Rect drect;
int result;
@@ -3221,7 +3221,7 @@ int SDLTest_DrawCharacter(SDL_Renderer *renderer, int x, int y, char c)
int SDLTest_DrawString(SDL_Renderer * renderer, int x, int y, const char *s)
{
- const Uint32 charWidth = 8;
+ const Uint32 charWidth = FONT_CHARACTER_SIZE;
int result = 0;
int curx = x;
int cury = y;