… | |
… | |
48 | #endif |
48 | #endif |
49 | |
49 | |
50 | #define PANGO_ENABLE_BACKEND |
50 | #define PANGO_ENABLE_BACKEND |
51 | #define G_DISABLE_CAST_CHECKS |
51 | #define G_DISABLE_CAST_CHECKS |
52 | |
52 | |
53 | #include <glib/gmacros.h> |
53 | #include <glib.h> |
54 | |
54 | |
55 | #include <pango/pango.h> |
55 | #include <pango/pango.h> |
56 | |
56 | |
57 | #ifndef PANGO_VERSION_CHECK |
57 | #ifndef PANGO_VERSION_CHECK |
58 | # define PANGO_VERSION_CHECK(a,b,c) 0 |
58 | # define PANGO_VERSION_CHECK(a,b,c) 0 |
… | |
… | |
184 | { |
184 | { |
185 | GSList *attrs = run->item->analysis.extra_attrs; |
185 | GSList *attrs = run->item->analysis.extra_attrs; |
186 | |
186 | |
187 | while (attrs) |
187 | while (attrs) |
188 | { |
188 | { |
189 | PangoAttribute *attr = attrs->data; |
189 | PangoAttribute *attr = (PangoAttribute *)attrs->data; |
190 | |
190 | |
191 | if (attr->klass->type == PANGO_ATTR_SHAPE) |
191 | if (attr->klass->type == PANGO_ATTR_SHAPE) |
192 | return 1; |
192 | return 1; |
193 | |
193 | |
194 | attrs = attrs->next; |
194 | attrs = attrs->next; |
… | |
… | |
212 | static void |
212 | static void |
213 | substitute_func (FcPattern *pattern, gpointer data) |
213 | substitute_func (FcPattern *pattern, gpointer data) |
214 | { |
214 | { |
215 | FcPatternAddBool (pattern, FC_HINTING, 1); |
215 | FcPatternAddBool (pattern, FC_HINTING, 1); |
216 | #ifdef FC_HINT_STYLE |
216 | #ifdef FC_HINT_STYLE |
217 | FcPatternAddBool (pattern, FC_HINT_STYLE, FC_HINT_FULL); |
217 | FcPatternAddInteger (pattern, FC_HINT_STYLE, FC_HINT_FULL); |
218 | #endif |
218 | #endif |
219 | FcPatternAddBool (pattern, FC_AUTOHINT, 0); |
219 | FcPatternAddBool (pattern, FC_AUTOHINT, 0); |
220 | } |
220 | } |
221 | |
221 | |
222 | static void |
222 | static void |
… | |
… | |
481 | ev.data2 = 0; |
481 | ev.data2 = 0; |
482 | |
482 | |
483 | SDL_PushEvent ((SDL_Event *)&ev); |
483 | SDL_PushEvent ((SDL_Event *)&ev); |
484 | } |
484 | } |
485 | |
485 | |
|
|
486 | // approximately divide by 255 |
486 | static unsigned int |
487 | static unsigned int |
487 | div255 (unsigned int n) |
488 | div255 (unsigned int n) |
488 | { |
489 | { |
489 | return (n + (n >> 8)) >> 8; |
490 | return (n + (n >> 8)) >> 8; |
490 | } |
491 | } |
… | |
… | |
889 | void SDL_QuitSubSystem (U32 flags) |
890 | void SDL_QuitSubSystem (U32 flags) |
890 | |
891 | |
891 | void SDL_Quit () |
892 | void SDL_Quit () |
892 | |
893 | |
893 | int SDL_GL_SetAttribute (int attr, int value) |
894 | int SDL_GL_SetAttribute (int attr, int value) |
|
|
895 | C_ARGS: (SDL_GLattr)attr, value |
894 | |
896 | |
895 | int SDL_GL_GetAttribute (int attr) |
897 | int SDL_GL_GetAttribute (int attr) |
896 | CODE: |
898 | CODE: |
897 | if (SDL_GL_GetAttribute (attr, &RETVAL)) |
899 | if (SDL_GL_GetAttribute ((SDL_GLattr)attr, &RETVAL)) |
898 | XSRETURN_UNDEF; |
900 | XSRETURN_UNDEF; |
899 | OUTPUT: |
901 | OUTPUT: |
900 | RETVAL |
902 | RETVAL |
901 | |
903 | |
902 | void |
904 | void |
… | |
… | |
975 | void |
977 | void |
976 | SDL_GL_SwapBuffers () |
978 | SDL_GL_SwapBuffers () |
977 | |
979 | |
978 | char * |
980 | char * |
979 | SDL_GetKeyName (int sym) |
981 | SDL_GetKeyName (int sym) |
|
|
982 | C_ARGS: (SDLKey)sym |
980 | |
983 | |
981 | int |
984 | int |
982 | SDL_GetAppState () |
985 | SDL_GetAppState () |
983 | |
986 | |
984 | int |
987 | int |
… | |
… | |
1081 | OUTPUT: |
1084 | OUTPUT: |
1082 | RETVAL |
1085 | RETVAL |
1083 | |
1086 | |
1084 | int |
1087 | int |
1085 | Mix_OpenAudio (int frequency = 44100, int format = MIX_DEFAULT_FORMAT, int channels = 2, int chunksize = 4096) |
1088 | Mix_OpenAudio (int frequency = 44100, int format = MIX_DEFAULT_FORMAT, int channels = 2, int chunksize = 4096) |
1086 | POSTCALL: |
1089 | POSTCALL: |
1087 | Mix_HookMusicFinished (music_finished); |
1090 | Mix_HookMusicFinished (music_finished); |
1088 | Mix_ChannelFinished (channel_finished); |
1091 | Mix_ChannelFinished (channel_finished); |
1089 | |
1092 | |
1090 | void |
1093 | void |
1091 | Mix_QuerySpec () |
1094 | Mix_QuerySpec () |
… | |
… | |
1212 | |
1215 | |
1213 | SDL_LockSurface (surface2); |
1216 | SDL_LockSurface (surface2); |
1214 | EXTEND (SP, 6); |
1217 | EXTEND (SP, 6); |
1215 | PUSHs (sv_2mortal (newSViv (surface2->w))); |
1218 | PUSHs (sv_2mortal (newSViv (surface2->w))); |
1216 | PUSHs (sv_2mortal (newSViv (surface2->h))); |
1219 | PUSHs (sv_2mortal (newSViv (surface2->h))); |
1217 | PUSHs (sv_2mortal (newSVpvn (surface2->pixels, surface2->h * surface2->pitch))); |
1220 | PUSHs (sv_2mortal (newSVpvn ((const char *)surface2->pixels, surface2->h * surface2->pitch))); |
1218 | PUSHs (sv_2mortal (newSViv (surface->flags & (SDL_SRCCOLORKEY | SDL_SRCALPHA) ? GL_RGBA : GL_RGB))); |
1221 | PUSHs (sv_2mortal (newSViv (surface->flags & (SDL_SRCCOLORKEY | SDL_SRCALPHA) ? GL_RGBA : GL_RGB))); |
1219 | PUSHs (sv_2mortal (newSViv (GL_RGBA))); |
1222 | PUSHs (sv_2mortal (newSViv (GL_RGBA))); |
1220 | PUSHs (sv_2mortal (newSViv (GL_UNSIGNED_BYTE))); |
1223 | PUSHs (sv_2mortal (newSViv (GL_UNSIGNED_BYTE))); |
1221 | SDL_UnlockSurface (surface2); |
1224 | SDL_UnlockSurface (surface2); |
1222 | |
1225 | |
… | |
… | |
1294 | MODULE = Deliantra::Client PACKAGE = DC::Font |
1297 | MODULE = Deliantra::Client PACKAGE = DC::Font |
1295 | |
1298 | |
1296 | PROTOTYPES: DISABLE |
1299 | PROTOTYPES: DISABLE |
1297 | |
1300 | |
1298 | DC::Font |
1301 | DC::Font |
1299 | new_from_file (SV *class, char *path, int id = 0) |
1302 | new_from_file (SV *klass, char *path, int id = 0) |
1300 | CODE: |
1303 | CODE: |
1301 | { |
1304 | { |
1302 | int count; |
1305 | int count; |
1303 | FcPattern *pattern = FcFreeTypeQuery ((const FcChar8 *)path, id, 0, &count); |
1306 | FcPattern *pattern = FcFreeTypeQuery ((const FcChar8 *)path, id, 0, &count); |
1304 | RETVAL = pango_fc_font_description_from_pattern (pattern, 0); |
1307 | RETVAL = pango_fc_font_description_from_pattern (pattern, 0); |
… | |
… | |
1333 | PROTOTYPE: |
1336 | PROTOTYPE: |
1334 | CODE: |
1337 | CODE: |
1335 | tc_restore (); |
1338 | tc_restore (); |
1336 | |
1339 | |
1337 | DC::Layout |
1340 | DC::Layout |
1338 | new (SV *class) |
1341 | new (SV *klass) |
1339 | CODE: |
1342 | CODE: |
1340 | New (0, RETVAL, 1, struct cf_layout); |
1343 | New (0, RETVAL, 1, struct cf_layout); |
1341 | |
1344 | |
1342 | RETVAL->pl = pango_layout_new (opengl_context); |
1345 | RETVAL->pl = pango_layout_new (opengl_context); |
1343 | RETVAL->r = 1.; |
1346 | RETVAL->r = 1.; |
… | |
… | |
1492 | |
1495 | |
1493 | void |
1496 | void |
1494 | set_height (DC::Layout self, int base_height) |
1497 | set_height (DC::Layout self, int base_height) |
1495 | CODE: |
1498 | CODE: |
1496 | if (self->base_height != base_height) |
1499 | if (self->base_height != base_height) |
1497 | { |
1500 | { |
1498 | self->base_height = base_height; |
1501 | self->base_height = base_height; |
1499 | layout_update_font (self); |
1502 | layout_update_font (self); |
1500 | } |
1503 | } |
1501 | |
1504 | |
1502 | void |
1505 | void |
… | |
… | |
1866 | MODULE = Deliantra::Client PACKAGE = DC::Map |
1869 | MODULE = Deliantra::Client PACKAGE = DC::Map |
1867 | |
1870 | |
1868 | PROTOTYPES: DISABLE |
1871 | PROTOTYPES: DISABLE |
1869 | |
1872 | |
1870 | DC::Map |
1873 | DC::Map |
1871 | new (SV *class) |
1874 | new (SV *klass) |
1872 | CODE: |
1875 | CODE: |
1873 | New (0, RETVAL, 1, struct map); |
1876 | New (0, RETVAL, 1, struct map); |
1874 | RETVAL->x = 0; |
1877 | RETVAL->x = 0; |
1875 | RETVAL->y = 0; |
1878 | RETVAL->y = 0; |
1876 | RETVAL->w = 0; |
1879 | RETVAL->w = 0; |
… | |
… | |
1915 | |
1918 | |
1916 | void |
1919 | void |
1917 | set_smooth (DC::Map self, int face, int smooth, int level) |
1920 | set_smooth (DC::Map self, int face, int smooth, int level) |
1918 | CODE: |
1921 | CODE: |
1919 | { |
1922 | { |
1920 | tileid texid; |
1923 | tileid texid; |
1921 | maptex *tex; |
1924 | maptex *tex; |
1922 | |
1925 | |
1923 | if (face < 0 || face >= self->faces) |
1926 | if (face < 0 || face >= self->faces) |
1924 | return; |
1927 | return; |
1925 | |
1928 | |
1926 | if (smooth < 0 || smooth >= self->faces) |
1929 | if (smooth < 0 || smooth >= self->faces) |
1927 | return; |
1930 | return; |
1928 | |
1931 | |
1929 | texid = self->face2tile [face]; |
1932 | texid = self->face2tile [face]; |
1930 | |
1933 | |
1931 | if (!texid) |
1934 | if (!texid) |
1932 | return; |
1935 | return; |
1933 | |
1936 | |
1934 | tex = self->tex + texid; |
1937 | tex = self->tex + texid; |
… | |
… | |
1967 | } |
1970 | } |
1968 | |
1971 | |
1969 | void |
1972 | void |
1970 | expire_textures (DC::Map self, int texid, int count) |
1973 | expire_textures (DC::Map self, int texid, int count) |
1971 | PPCODE: |
1974 | PPCODE: |
1972 | for (; texid < self->texs && count; ++texid, --count) |
1975 | for (; texid < self->texs && count; ++texid, --count) |
1973 | { |
1976 | { |
1974 | maptex *tex = self->tex + texid; |
1977 | maptex *tex = self->tex + texid; |
1975 | |
1978 | |
1976 | if (tex->name) |
1979 | if (tex->name) |
1977 | { |
1980 | { |
… | |
… | |
2032 | self->y += MAP_EXTEND_Y; |
2035 | self->y += MAP_EXTEND_Y; |
2033 | } |
2036 | } |
2034 | } |
2037 | } |
2035 | |
2038 | |
2036 | SV * |
2039 | SV * |
2037 | map1a_update (DC::Map self, SV *data_, int extmap) |
2040 | map1a_update (DC::Map self, SV *data_) |
2038 | CODE: |
2041 | CODE: |
2039 | { |
2042 | { |
2040 | uint8_t *data = (uint8_t *)SvPVbyte_nolen (data_); |
2043 | uint8_t *data = (uint8_t *)SvPVbyte_nolen (data_); |
2041 | uint8_t *data_end = (uint8_t *)SvEND (data_); |
2044 | uint8_t *data_end = (uint8_t *)SvEND (data_); |
2042 | mapcell *cell; |
2045 | mapcell *cell; |
… | |
… | |
2063 | |
2066 | |
2064 | //TODO: don't trust server data to be in-range(!) |
2067 | //TODO: don't trust server data to be in-range(!) |
2065 | |
2068 | |
2066 | if (flags & 8) |
2069 | if (flags & 8) |
2067 | { |
2070 | { |
|
|
2071 | uint8_t ext, cmd; |
|
|
2072 | |
2068 | if (extmap) |
2073 | do |
2069 | { |
2074 | { |
2070 | uint8_t ext, cmd; |
2075 | ext = *data++; |
|
|
2076 | cmd = ext & 0x7f; |
2071 | |
2077 | |
2072 | do |
2078 | if (cmd < 4) |
|
|
2079 | cell->darkness = 255 - ext * 64 + 1; /* make sure this doesn't collide with FOW_DARKNESS */ |
|
|
2080 | else if (cmd == 5) // health |
2073 | { |
2081 | { |
2074 | ext = *data++; |
|
|
2075 | cmd = ext & 0x7f; |
|
|
2076 | |
|
|
2077 | if (cmd < 4) |
|
|
2078 | cell->darkness = 255 - ext * 64 + 1; /* make sure this doesn't collide with FOW_DARKNESS */ |
|
|
2079 | else if (cmd == 5) // health |
|
|
2080 | { |
|
|
2081 | cell->stat_width = 1; |
2082 | cell->stat_width = 1; |
2082 | cell->stat_hp = *data++; |
2083 | cell->stat_hp = *data++; |
2083 | } |
|
|
2084 | else if (cmd == 6) // monster width |
|
|
2085 | cell->stat_width = *data++ + 1; |
|
|
2086 | else if (cmd == 0x47) |
|
|
2087 | { |
|
|
2088 | if (*data == 1) cell->player = data [1]; |
|
|
2089 | else if (*data == 2) cell->player = data [2] + (data [1] << 8); |
|
|
2090 | else if (*data == 3) cell->player = data [3] + (data [2] << 8) + (data [1] << 16); |
|
|
2091 | else if (*data == 4) cell->player = data [4] + (data [3] << 8) + (data [2] << 16) + (data [1] << 24); |
|
|
2092 | |
|
|
2093 | data += *data + 1; |
|
|
2094 | } |
|
|
2095 | else if (cmd == 8) // cell flags |
|
|
2096 | cell->flags = *data++; |
|
|
2097 | else if (ext & 0x40) // unknown, multibyte => skip |
|
|
2098 | data += *data + 1; |
|
|
2099 | else |
|
|
2100 | data++; |
|
|
2101 | } |
2084 | } |
2102 | while (ext & 0x80); |
2085 | else if (cmd == 6) // monster width |
|
|
2086 | cell->stat_width = *data++ + 1; |
|
|
2087 | else if (cmd == 0x47) |
|
|
2088 | { |
|
|
2089 | if (*data == 1) cell->player = data [1]; |
|
|
2090 | else if (*data == 2) cell->player = data [2] + (data [1] << 8); |
|
|
2091 | else if (*data == 3) cell->player = data [3] + (data [2] << 8) + (data [1] << 16); |
|
|
2092 | else if (*data == 4) cell->player = data [4] + (data [3] << 8) + (data [2] << 16) + (data [1] << 24); |
|
|
2093 | |
|
|
2094 | data += *data + 1; |
|
|
2095 | } |
|
|
2096 | else if (cmd == 8) // cell flags |
|
|
2097 | cell->flags = *data++; |
|
|
2098 | else if (ext & 0x40) // unknown, multibyte => skip |
|
|
2099 | data += *data + 1; |
|
|
2100 | else |
|
|
2101 | data++; |
2103 | } |
2102 | } |
2104 | else |
2103 | while (ext & 0x80); |
2105 | cell->darkness = *data++ + 1; |
|
|
2106 | } |
2104 | } |
2107 | |
2105 | |
2108 | for (z = 0; z <= 2; ++z) |
2106 | for (z = 0; z <= 2; ++z) |
2109 | if (flags & (4 >> z)) |
2107 | if (flags & (4 >> z)) |
2110 | { |
2108 | { |
… | |
… | |
2184 | | (b << 16) |
2182 | | (b << 16) |
2185 | | (a << 24); |
2183 | | (a << 24); |
2186 | } |
2184 | } |
2187 | } |
2185 | } |
2188 | |
2186 | |
2189 | RETVAL = map_sv; |
2187 | RETVAL = map_sv; |
2190 | } |
2188 | } |
2191 | OUTPUT: |
2189 | OUTPUT: |
2192 | RETVAL |
2190 | RETVAL |
2193 | |
2191 | |
2194 | void |
2192 | void |
2195 | draw (DC::Map self, int mx, int my, int sw, int sh, int Tw, int Th, U32 player = 0xffffffff, int sdx = 0, int sdy = 0) |
2193 | draw (DC::Map self, int mx, int my, int sw, int sh, int Tw, int Th, U32 player = 0xffffffff, int sdx = 0, int sdy = 0) |
2196 | CODE: |
2194 | CODE: |
2197 | { |
2195 | { |
2198 | int x, y, z; |
2196 | int x, y, z; |
2199 | |
2197 | |
2200 | HV *smooth = (HV *)sv_2mortal ((SV *)newHV ()); |
2198 | HV *smooth = (HV *)sv_2mortal ((SV *)newHV ()); |
2201 | uint32_t smooth_level[256 / 32]; // one bit for every possible smooth level |
2199 | uint32_t smooth_level[256 / 32]; // one bit for every possible smooth level |
2202 | static uint8_t smooth_max[256][256]; // egad, fast and wasteful on memory (64k) |
2200 | static uint8_t smooth_max[256][256]; // egad, fast and wasteful on memory (64k) |
2203 | smooth_key skey; |
2201 | smooth_key skey; |
2204 | int pl_x, pl_y; |
2202 | int pl_x, pl_y; |
2205 | maptex pl_tex; |
2203 | maptex pl_tex; |
… | |
… | |
2723 | else |
2721 | else |
2724 | *data++ = 0; |
2722 | *data++ = 0; |
2725 | } |
2723 | } |
2726 | } |
2724 | } |
2727 | |
2725 | |
2728 | /* if size is w*h + 5 then no data has been found */ |
2726 | /* if size is w*h + 5 then no data has been found */ |
2729 | if (data - (uint8_t *)SvPVX (data_sv) != w * h + 5) |
2727 | if (data - (uint8_t *)SvPVX (data_sv) != w * h + 5) |
2730 | { |
2728 | { |
2731 | SvPOK_only (data_sv); |
2729 | SvPOK_only (data_sv); |
2732 | SvCUR_set (data_sv, data - (uint8_t *)SvPVX (data_sv)); |
2730 | SvCUR_set (data_sv, data - (uint8_t *)SvPVX (data_sv)); |
2733 | } |
2731 | } |
2734 | |
2732 | |
2735 | RETVAL = data_sv; |
2733 | RETVAL = data_sv; |
2736 | } |
2734 | } |
2737 | OUTPUT: |
2735 | OUTPUT: |
2738 | RETVAL |
2736 | RETVAL |
2739 | |
2737 | |
2740 | void |
2738 | void |
… | |
… | |
2747 | STRLEN len; |
2745 | STRLEN len; |
2748 | uint8_t *data, *end; |
2746 | uint8_t *data, *end; |
2749 | |
2747 | |
2750 | len = SvLEN (data_sv); |
2748 | len = SvLEN (data_sv); |
2751 | SvGROW (data_sv, len + 8); // reserve at least 7+ bytes more |
2749 | SvGROW (data_sv, len + 8); // reserve at least 7+ bytes more |
2752 | data = SvPVbyte_nolen (data_sv); |
2750 | data = (uint8_t *)SvPVbyte_nolen (data_sv); |
2753 | end = data + len + 8; |
2751 | end = data + len + 8; |
2754 | |
2752 | |
2755 | if (len < 5) |
2753 | if (len < 5) |
2756 | XSRETURN_EMPTY; |
2754 | XSRETURN_EMPTY; |
2757 | |
2755 | |
… | |
… | |
2818 | } |
2816 | } |
2819 | |
2817 | |
2820 | MODULE = Deliantra::Client PACKAGE = DC::RW |
2818 | MODULE = Deliantra::Client PACKAGE = DC::RW |
2821 | |
2819 | |
2822 | DC::RW |
2820 | DC::RW |
2823 | new (SV *class, SV *data_sv) |
2821 | new (SV *klass, SV *data_sv) |
2824 | CODE: |
2822 | CODE: |
2825 | { |
2823 | { |
2826 | STRLEN datalen; |
2824 | STRLEN datalen; |
2827 | char *data = SvPVbyte (data_sv, datalen); |
2825 | char *data = SvPVbyte (data_sv, datalen); |
2828 | |
2826 | |
… | |
… | |
2830 | } |
2828 | } |
2831 | OUTPUT: |
2829 | OUTPUT: |
2832 | RETVAL |
2830 | RETVAL |
2833 | |
2831 | |
2834 | DC::RW |
2832 | DC::RW |
2835 | new_from_file (SV *class, const char *path, const char *mode = "rb") |
2833 | new_from_file (SV *klass, const char *path, const char *mode = "rb") |
2836 | CODE: |
2834 | CODE: |
2837 | RETVAL = SDL_RWFromFile (path, mode); |
2835 | RETVAL = SDL_RWFromFile (path, mode); |
2838 | OUTPUT: |
2836 | OUTPUT: |
2839 | RETVAL |
2837 | RETVAL |
2840 | |
2838 | |
… | |
… | |
2949 | #else |
2947 | #else |
2950 | XPUSHs (sv_2mortal (newSVpv ("(sdl mixer too old)", 0))); |
2948 | XPUSHs (sv_2mortal (newSVpv ("(sdl mixer too old)", 0))); |
2951 | #endif |
2949 | #endif |
2952 | |
2950 | |
2953 | DC::MixChunk |
2951 | DC::MixChunk |
2954 | new (SV *class, DC::RW rwops) |
2952 | new (SV *klass, DC::RW rwops) |
2955 | CODE: |
2953 | CODE: |
2956 | RETVAL = Mix_LoadWAV_RW (rwops, 1); |
2954 | RETVAL = Mix_LoadWAV_RW (rwops, 1); |
2957 | OUTPUT: |
2955 | OUTPUT: |
2958 | RETVAL |
2956 | RETVAL |
2959 | |
2957 | |
… | |
… | |
3029 | RETVAL = Mix_PlayingMusic (); |
3027 | RETVAL = Mix_PlayingMusic (); |
3030 | OUTPUT: |
3028 | OUTPUT: |
3031 | RETVAL |
3029 | RETVAL |
3032 | |
3030 | |
3033 | DC::MixMusic |
3031 | DC::MixMusic |
3034 | new (SV *class, DC::RW rwops) |
3032 | new (SV *klass, DC::RW rwops) |
3035 | CODE: |
3033 | CODE: |
3036 | RETVAL = Mix_LoadMUS_RW (rwops); |
3034 | RETVAL = Mix_LoadMUS_RW (rwops); |
3037 | OUTPUT: |
3035 | OUTPUT: |
3038 | RETVAL |
3036 | RETVAL |
3039 | |
3037 | |
… | |
… | |
3192 | gl.BlendFuncSeparateEXT = 0; |
3190 | gl.BlendFuncSeparateEXT = 0; |
3193 | |
3191 | |
3194 | void |
3192 | void |
3195 | apple_nvidia_bug (int enable) |
3193 | apple_nvidia_bug (int enable) |
3196 | |
3194 | |
3197 | char * |
3195 | const char * |
3198 | gl_vendor () |
3196 | gl_vendor () |
3199 | CODE: |
3197 | CODE: |
3200 | RETVAL = (char *)glGetString (GL_VENDOR); |
3198 | RETVAL = (const char *)glGetString (GL_VENDOR); |
3201 | OUTPUT: |
3199 | OUTPUT: |
3202 | RETVAL |
3200 | RETVAL |
3203 | |
3201 | |
3204 | char * |
3202 | const char * |
3205 | gl_version () |
3203 | gl_version () |
3206 | CODE: |
3204 | CODE: |
3207 | RETVAL = (char *)glGetString (GL_VERSION); |
3205 | RETVAL = (const char *)glGetString (GL_VERSION); |
3208 | OUTPUT: |
3206 | OUTPUT: |
3209 | RETVAL |
3207 | RETVAL |
3210 | |
3208 | |
3211 | char * |
3209 | const char * |
3212 | gl_extensions () |
3210 | gl_extensions () |
3213 | CODE: |
3211 | CODE: |
3214 | RETVAL = (char *)glGetString (GL_EXTENSIONS); |
3212 | RETVAL = (const char *)glGetString (GL_EXTENSIONS); |
3215 | OUTPUT: |
3213 | OUTPUT: |
3216 | RETVAL |
3214 | RETVAL |
3217 | |
3215 | |
3218 | const char *glGetString (GLenum pname) |
3216 | const char *glGetString (GLenum pname) |
|
|
3217 | CODE: |
|
|
3218 | RETVAL = (const char *)glGetString (pname); |
|
|
3219 | OUTPUT: |
|
|
3220 | RETVAL |
3219 | |
3221 | |
3220 | GLint glGetInteger (GLenum pname) |
3222 | GLint glGetInteger (GLenum pname) |
3221 | CODE: |
3223 | CODE: |
3222 | glGetIntegerv (pname, &RETVAL); |
3224 | glGetIntegerv (pname, &RETVAL); |
3223 | OUTPUT: |
3225 | OUTPUT: |
… | |
… | |
3426 | |
3428 | |
3427 | void |
3429 | void |
3428 | find_widget (SV *self, NV x, NV y) |
3430 | find_widget (SV *self, NV x, NV y) |
3429 | PPCODE: |
3431 | PPCODE: |
3430 | { |
3432 | { |
3431 | if (within_widget (self, x, y)) |
3433 | if (within_widget (self, x, y)) |
3432 | XPUSHs (self); |
3434 | XPUSHs (self); |
3433 | } |
3435 | } |
3434 | |
3436 | |
3435 | BOOT: |
3437 | BOOT: |
3436 | { |
3438 | { |
… | |
… | |
3444 | |
3446 | |
3445 | void |
3447 | void |
3446 | draw (SV *self) |
3448 | draw (SV *self) |
3447 | CODE: |
3449 | CODE: |
3448 | { |
3450 | { |
3449 | HV *hv; |
3451 | HV *hv; |
3450 | SV **svp; |
3452 | SV **svp; |
3451 | NV x, y, w, h; |
3453 | NV x, y, w, h; |
3452 | SV *draw_x_sv = GvSV (draw_x_gv); |
3454 | SV *draw_x_sv = GvSV (draw_x_gv); |
3453 | SV *draw_y_sv = GvSV (draw_y_gv); |
3455 | SV *draw_y_sv = GvSV (draw_y_gv); |
3454 | SV *draw_w_sv = GvSV (draw_w_gv); |
3456 | SV *draw_w_sv = GvSV (draw_w_gv); |
3455 | SV *draw_h_sv = GvSV (draw_h_gv); |
3457 | SV *draw_h_sv = GvSV (draw_h_gv); |