… | |
… | |
10 | #include "XSUB.h" |
10 | #include "XSUB.h" |
11 | |
11 | |
12 | #include <math.h> |
12 | #include <math.h> |
13 | #include <string.h> |
13 | #include <string.h> |
14 | #include <stdio.h> |
14 | #include <stdio.h> |
|
|
15 | #include <stdlib.h> |
15 | |
16 | |
16 | #include <SDL.h> |
17 | #include <SDL.h> |
17 | #include <SDL_endian.h> |
18 | #include <SDL_endian.h> |
18 | #include <SDL_image.h> |
19 | #include <SDL_image.h> |
19 | #include <SDL_mixer.h> |
20 | #include <SDL_mixer.h> |
… | |
… | |
85 | static PangoFontMap *ft2_fontmap, *cairo_fontmap; |
86 | static PangoFontMap *ft2_fontmap, *cairo_fontmap; |
86 | |
87 | |
87 | static void |
88 | static void |
88 | substitute_func (FcPattern *pattern, gpointer data) |
89 | substitute_func (FcPattern *pattern, gpointer data) |
89 | { |
90 | { |
90 | FcPatternAddBool (pattern, FC_HINTING , 1); |
91 | FcPatternAddBool (pattern, FC_HINTING, 1); |
|
|
92 | #ifdef FC_HINT_STYLE |
|
|
93 | FcPatternAddBool (pattern, FC_HINT_STYLE, FC_HINT_FULL); |
|
|
94 | #endif |
91 | #ifdef _WIN32 |
95 | #ifdef _WIN32 |
92 | FcPatternAddBool (pattern, FC_AUTOHINT, 1); |
96 | FcPatternAddBool (pattern, FC_AUTOHINT, 1); |
93 | #else |
97 | #else |
94 | FcPatternAddBool (pattern, FC_AUTOHINT, 0); |
98 | FcPatternAddBool (pattern, FC_AUTOHINT, 0); |
95 | #endif |
99 | #endif |
… | |
… | |
700 | CODE: |
704 | CODE: |
701 | fprintf (stderr, "FATAL: %s\n", message); |
705 | fprintf (stderr, "FATAL: %s\n", message); |
702 | #ifdef _WIN32 |
706 | #ifdef _WIN32 |
703 | MessageBox (0, message, "Crossfire+ Fatal Error", MB_OK | MB_ICONERROR); |
707 | MessageBox (0, message, "Crossfire+ Fatal Error", MB_OK | MB_ICONERROR); |
704 | #endif |
708 | #endif |
705 | exit (1); |
709 | _exit (1); |
|
|
710 | |
|
|
711 | void |
|
|
712 | _exit (int retval) |
|
|
713 | CODE: |
|
|
714 | _exit (retval); |
706 | |
715 | |
707 | MODULE = CFClient PACKAGE = CFClient::Font |
716 | MODULE = CFClient PACKAGE = CFClient::Font |
708 | |
717 | |
709 | CFClient::Font |
718 | CFClient::Font |
710 | new_from_file (SV *class, char *path, int id = 0) |
719 | new_from_file (SV *class, char *path, int id = 0) |
… | |
… | |
784 | |
793 | |
785 | SV * |
794 | SV * |
786 | get_text (CFClient::Layout self) |
795 | get_text (CFClient::Layout self) |
787 | CODE: |
796 | CODE: |
788 | RETVAL = newSVpv (pango_layout_get_text (self->pl), 0); |
797 | RETVAL = newSVpv (pango_layout_get_text (self->pl), 0); |
789 | SvUTF8_on (RETVAL); |
798 | sv_utf8_decode (RETVAL); |
790 | OUTPUT: |
799 | OUTPUT: |
791 | RETVAL |
800 | RETVAL |
792 | |
801 | |
793 | void |
802 | void |
794 | set_foreground (CFClient::Layout self, float r, float g, float b, float a = 1.) |
803 | set_foreground (CFClient::Layout self, float r, float g, float b, float a = 1.) |
… | |
… | |
1050 | DESTROY (CFClient::Map self) |
1059 | DESTROY (CFClient::Map self) |
1051 | CODE: |
1060 | CODE: |
1052 | { |
1061 | { |
1053 | map_clear (self); |
1062 | map_clear (self); |
1054 | Safefree (self->face); |
1063 | Safefree (self->face); |
|
|
1064 | Safefree (self->tex); |
1055 | Safefree (self); |
1065 | Safefree (self); |
1056 | } |
1066 | } |
1057 | |
1067 | |
1058 | void |
1068 | void |
1059 | clear (CFClient::Map self) |
1069 | clear (CFClient::Map self) |