… | |
… | |
40 | |
40 | |
41 | #include "perlxsi.c" |
41 | #include "perlxsi.c" |
42 | |
42 | |
43 | extern sint64 *levels; // the experience table |
43 | extern sint64 *levels; // the experience table |
44 | |
44 | |
45 | typedef object object_ornull; |
45 | typedef object object_ornull; |
46 | typedef mapstruct mapstruct_ornull; |
46 | typedef maptile maptile_ornull; |
47 | |
47 | |
48 | typedef double val64; |
48 | typedef double val64; |
49 | #define newSVval64 newSVnv |
49 | #define newSVval64 newSVnv |
50 | #define SvVAL64 SvNV |
50 | #define SvVAL64 SvNV |
51 | |
51 | |
… | |
… | |
55 | |
55 | |
56 | static HV *obj_cache; |
56 | static HV *obj_cache; |
57 | static PerlInterpreter *perl; |
57 | static PerlInterpreter *perl; |
58 | |
58 | |
59 | static AV *cb_global, *cb_object, *cb_player, *cb_type, *cb_map; |
59 | static AV *cb_global, *cb_object, *cb_player, *cb_type, *cb_map; |
60 | |
|
|
61 | #define PUSHcfapi(type,value) PUSHs (sv_2mortal (newSVcfapi (CFAPI_ ## type, (value)))) |
|
|
62 | #define PUSHcfapi_va(type,ctype) PUSHcfapi (type, va_arg (args, ctype)) |
|
|
63 | #define PUSH_OB PUSHcfapi_va(POBJECT, object *) |
|
|
64 | #define PUSH_PL PUSHcfapi_va(PPLAYER, player *) |
|
|
65 | #define PUSH_MAP PUSHcfapi_va(PMAP, mapstruct *) |
|
|
66 | #define PUSH_PV PUSHcfapi_va(STRING, const char *) |
|
|
67 | #define PUSH_IV PUSHs (sv_2mortal (newSViv (va_arg (args, int)))) |
|
|
68 | |
60 | |
69 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
61 | ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// |
70 | |
62 | |
71 | static SV * |
63 | static SV * |
72 | newSVptr (void *ptr, const char *klass, HV *hv = newHV ()) |
64 | newSVptr (void *ptr, const char *klass, HV *hv = newHV ()) |
… | |
… | |
177 | inline SV *to_sv (unsigned long long v) { return newSVval64 (v); } |
169 | inline SV *to_sv (unsigned long long v) { return newSVval64 (v); } |
178 | inline SV *to_sv (float v) { return newSVnv (v); } |
170 | inline SV *to_sv (float v) { return newSVnv (v); } |
179 | inline SV *to_sv (double v) { return newSVnv (v); } |
171 | inline SV *to_sv (double v) { return newSVnv (v); } |
180 | inline SV *to_sv (player * v) { return newSVattachable (v, "cf::player::wrap"); } |
172 | inline SV *to_sv (player * v) { return newSVattachable (v, "cf::player::wrap"); } |
181 | inline SV *to_sv (object * v) { return newSVattachable (v, v && v->type == PLAYER ? "cf::object::player::wrap" : "cf::object::wrap"); } |
173 | inline SV *to_sv (object * v) { return newSVattachable (v, v && v->type == PLAYER ? "cf::object::player::wrap" : "cf::object::wrap"); } |
182 | inline SV *to_sv (mapstruct * v) { return newSVattachable (v, "cf::map::wrap"); } |
174 | inline SV *to_sv (maptile * v) { return newSVattachable (v, "cf::map::wrap"); } |
183 | inline SV *to_sv (archetype * v) { return newSVptr (v, "cf::arch::wrap"); } |
175 | inline SV *to_sv (archetype * v) { return newSVptr (v, "cf::arch::wrap"); } |
184 | inline SV *to_sv (partylist * v) { return newSVptr (v, "cf::party::wrap"); } |
176 | inline SV *to_sv (partylist * v) { return newSVptr (v, "cf::party::wrap"); } |
185 | inline SV *to_sv (region * v) { return newSVptr (v, "cf::region::wrap"); } |
177 | inline SV *to_sv (region * v) { return newSVptr (v, "cf::region::wrap"); } |
186 | inline SV *to_sv (living * v) { return newSVptr (v, "cf::living::wrap"); } |
178 | inline SV *to_sv (living * v) { return newSVptr (v, "cf::living::wrap"); } |
187 | |
179 | |
… | |
… | |
208 | inline void sv_to (SV *sv, float &v) { v = SvNV (sv); } |
200 | inline void sv_to (SV *sv, float &v) { v = SvNV (sv); } |
209 | inline void sv_to (SV *sv, double &v) { v = SvNV (sv); } |
201 | inline void sv_to (SV *sv, double &v) { v = SvNV (sv); } |
210 | inline void sv_to (SV *sv, player * &v) { v = (player *)SvPTR_ornull (sv, "cf::player"); } |
202 | inline void sv_to (SV *sv, player * &v) { v = (player *)SvPTR_ornull (sv, "cf::player"); } |
211 | inline void sv_to (SV *sv, object * &v) { v = (object *)SvPTR_ornull (sv, "cf::object"); } |
203 | inline void sv_to (SV *sv, object * &v) { v = (object *)SvPTR_ornull (sv, "cf::object"); } |
212 | inline void sv_to (SV *sv, archetype * &v) { v = (archetype *)SvPTR_ornull (sv, "cf::arch"); } |
204 | inline void sv_to (SV *sv, archetype * &v) { v = (archetype *)SvPTR_ornull (sv, "cf::arch"); } |
213 | inline void sv_to (SV *sv, mapstruct * &v) { v = (mapstruct *)SvPTR_ornull (sv, "cf::map"); } |
205 | inline void sv_to (SV *sv, maptile * &v) { v = (maptile *)SvPTR_ornull (sv, "cf::map"); } |
214 | inline void sv_to (SV *sv, partylist * &v) { v = (partylist *)SvPTR_ornull (sv, "cf::party"); } |
206 | inline void sv_to (SV *sv, partylist * &v) { v = (partylist *)SvPTR_ornull (sv, "cf::party"); } |
215 | inline void sv_to (SV *sv, region * &v) { v = (region *)SvPTR_ornull (sv, "cf::region"); } |
207 | inline void sv_to (SV *sv, region * &v) { v = (region *)SvPTR_ornull (sv, "cf::region"); } |
216 | inline void sv_to (SV *sv, living * &v) { v = (living *)SvPTR_ornull (sv, "cf::living"); } |
208 | inline void sv_to (SV *sv, living * &v) { v = (living *)SvPTR_ornull (sv, "cf::living"); } |
217 | |
209 | |
218 | inline void sv_to (SV *sv, New_Face * &v) { v = &new_faces[FindFace (SvPV_nolen (sv), 0)]; } //TODO |
210 | inline void sv_to (SV *sv, New_Face * &v) { v = &new_faces[FindFace (SvPV_nolen (sv), 0)]; } //TODO |
… | |
… | |
262 | sv = to_sv (va_arg (ap, object *)); |
254 | sv = to_sv (va_arg (ap, object *)); |
263 | break; |
255 | break; |
264 | |
256 | |
265 | case DT_MAP: |
257 | case DT_MAP: |
266 | // va_arg (object *) when void * is passed is an XSI extension |
258 | // va_arg (object *) when void * is passed is an XSI extension |
267 | sv = to_sv (va_arg (ap, mapstruct *)); |
259 | sv = to_sv (va_arg (ap, maptile *)); |
268 | break; |
260 | break; |
269 | |
261 | |
270 | case DT_PLAYER: |
262 | case DT_PLAYER: |
271 | sv = to_sv (va_arg (ap, player *)); |
263 | sv = to_sv (va_arg (ap, player *)); |
272 | break; |
264 | break; |
… | |
… | |
349 | { |
341 | { |
350 | if (cb) |
342 | if (cb) |
351 | if (SvROK (*av_fetch (cb, EVENT_OBJECT_DESTROY, 1))) |
343 | if (SvROK (*av_fetch (cb, EVENT_OBJECT_DESTROY, 1))) |
352 | INVOKE_OBJECT (DESTROY, static_cast<object *>(this)); |
344 | INVOKE_OBJECT (DESTROY, static_cast<object *>(this)); |
353 | else if (SvROK (*av_fetch (cb, EVENT_MAP_DESTROY, 1))) |
345 | else if (SvROK (*av_fetch (cb, EVENT_MAP_DESTROY, 1))) |
354 | INVOKE_MAP (DESTROY, static_cast<mapstruct *>(this)); |
346 | INVOKE_MAP (DESTROY, static_cast<maptile *>(this)); |
355 | |
347 | |
356 | // disconnect Perl from C, to avoid crashes |
348 | // disconnect Perl from C, to avoid crashes |
357 | sv_unmagic (SvRV ((SV *)self), PERL_MAGIC_ext); |
349 | sv_unmagic (SvRV ((SV *)self), PERL_MAGIC_ext); |
358 | |
350 | |
359 | // clear the perl hash, might or might not be a good idea |
351 | // clear the perl hash, might or might not be a good idea |
… | |
… | |
939 | |
931 | |
940 | AV *callbacks = 0; |
932 | AV *callbacks = 0; |
941 | |
933 | |
942 | object *op; |
934 | object *op; |
943 | player *pl; |
935 | player *pl; |
944 | mapstruct *map; |
936 | maptile *map; |
945 | |
937 | |
946 | // callback call ordering is: |
938 | // callback call ordering is: |
947 | // 1. per-object callback (NYI) |
939 | // 1. per-object callback (NYI) |
948 | // 2. per-class object |
940 | // 2. per-class object |
949 | // 2a. per-type callback |
941 | // 2a. per-type callback |
… | |
… | |
999 | break; |
991 | break; |
1000 | |
992 | |
1001 | case KLASS_MAP: |
993 | case KLASS_MAP: |
1002 | dt = (data_type) va_arg (ap, int); |
994 | dt = (data_type) va_arg (ap, int); |
1003 | assert (("first argument must be of type object", dt == DT_MAP)); |
995 | assert (("first argument must be of type object", dt == DT_MAP)); |
1004 | map = va_arg (ap, mapstruct *); |
996 | map = va_arg (ap, maptile *); |
1005 | |
997 | |
1006 | if (map->cb) |
998 | if (map->cb) |
1007 | gather_callbacks (callbacks, map->cb, event); |
999 | gather_callbacks (callbacks, map->cb, event); |
1008 | |
1000 | |
1009 | gather_callbacks (callbacks, cb_map, event); |
1001 | gather_callbacks (callbacks, cb_map, event); |
… | |
… | |
1626 | { |
1618 | { |
1627 | // reattach to all attachable objects in the game. |
1619 | // reattach to all attachable objects in the game. |
1628 | for (player *pl = first_player; pl; pl = pl->next) |
1620 | for (player *pl = first_player; pl; pl = pl->next) |
1629 | reattach (pl); |
1621 | reattach (pl); |
1630 | |
1622 | |
1631 | for (mapstruct *map = first_map; map; map = map->next) |
1623 | for (maptile *map = first_map; map; map = map->next) |
1632 | reattach (map); |
1624 | reattach (map); |
1633 | |
1625 | |
1634 | for (object *op = object::first; op; op = op->next) |
1626 | for (object *op = object::first; op; op = op->next) |
1635 | reattach (op); |
1627 | reattach (op); |
1636 | } |
1628 | } |
… | |
… | |
1843 | |
1835 | |
1844 | object *cf_object_present_archname_inside (object *op, char *whatstr) |
1836 | object *cf_object_present_archname_inside (object *op, char *whatstr) |
1845 | |
1837 | |
1846 | int cf_object_transfer (object *op, int x, int y, int r = 0, object_ornull *orig = 0) |
1838 | int cf_object_transfer (object *op, int x, int y, int r = 0, object_ornull *orig = 0) |
1847 | |
1839 | |
1848 | int cf_object_change_map (object *op, int x, int y, mapstruct *map) |
1840 | int cf_object_change_map (object *op, int x, int y, maptile *map) |
1849 | |
1841 | |
1850 | object *cf_object_clone (object *op, int clonetype = 0) |
1842 | object *cf_object_clone (object *op, int clonetype = 0) |
1851 | |
1843 | |
1852 | int cf_object_pay_item (object *op, object *buyer) |
1844 | int cf_object_pay_item (object *op, object *buyer) |
1853 | |
1845 | |
… | |
… | |
1885 | |
1877 | |
1886 | object *cf_object_insert_object (object *op, object *container) |
1878 | object *cf_object_insert_object (object *op, object *container) |
1887 | |
1879 | |
1888 | object *cf_object_insert_in_ob (object *ob, object *where) |
1880 | object *cf_object_insert_in_ob (object *ob, object *where) |
1889 | |
1881 | |
1890 | int cf_object_teleport (object *op, mapstruct *map, int x, int y) |
1882 | int cf_object_teleport (object *op, maptile *map, int x, int y) |
1891 | |
1883 | |
1892 | void cf_object_update (object *op, int flags) |
1884 | void cf_object_update (object *op, int flags) |
1893 | |
1885 | |
1894 | void cf_object_pickup (object *op, object *what) |
1886 | void cf_object_pickup (object *op, object *what) |
1895 | |
1887 | |
… | |
… | |
1905 | |
1897 | |
1906 | void push_button (object *op); |
1898 | void push_button (object *op); |
1907 | |
1899 | |
1908 | void use_trigger (object *op); |
1900 | void use_trigger (object *op); |
1909 | |
1901 | |
1910 | void add_button_link (object *button, mapstruct *map, int connected); |
1902 | void add_button_link (object *button, maptile *map, int connected); |
1911 | |
1903 | |
1912 | void remove_button_link (object *op); |
1904 | void remove_button_link (object *op); |
1913 | |
1905 | |
1914 | void |
1906 | void |
1915 | cf_object_set_resistance (object *op, int rtype, int val) |
1907 | cf_object_set_resistance (object *op, int rtype, int val) |
… | |
… | |
1933 | CODE: |
1925 | CODE: |
1934 | RETVAL = archetype ? get_archetype (archetype) : cf_create_object (); |
1926 | RETVAL = archetype ? get_archetype (archetype) : cf_create_object (); |
1935 | OUTPUT: |
1927 | OUTPUT: |
1936 | RETVAL |
1928 | RETVAL |
1937 | |
1929 | |
1938 | object *insert_ob_in_map_at (object *ob, mapstruct *where, object_ornull *orig, int flag, int x, int y) |
1930 | object *insert_ob_in_map_at (object *ob, maptile *where, object_ornull *orig, int flag, int x, int y) |
1939 | PROTOTYPE: $$$$$$ |
1931 | PROTOTYPE: $$$$$$ |
1940 | CODE: |
1932 | CODE: |
1941 | { |
1933 | { |
1942 | int unused_type; |
1934 | int unused_type; |
1943 | RETVAL = (object *)object_insert (&unused_type, ob, 0, where, orig, flag, x, y); |
1935 | RETVAL = (object *)object_insert (&unused_type, ob, 0, where, orig, flag, x, y); |
… | |
… | |
2158 | OUTPUT: RETVAL |
2150 | OUTPUT: RETVAL |
2159 | |
2151 | |
2160 | |
2152 | |
2161 | MODULE = cf PACKAGE = cf::map PREFIX = cf_map_ |
2153 | MODULE = cf PACKAGE = cf::map PREFIX = cf_map_ |
2162 | |
2154 | |
2163 | mapstruct *first () |
2155 | maptile *first () |
2164 | PROTOTYPE: |
2156 | PROTOTYPE: |
2165 | CODE: |
2157 | CODE: |
2166 | RETVAL = first_map; |
2158 | RETVAL = first_map; |
2167 | OUTPUT: RETVAL |
2159 | OUTPUT: RETVAL |
2168 | |
2160 | |
2169 | int invoke (mapstruct *map, int event, ...) |
2161 | int invoke (maptile *map, int event, ...) |
2170 | CODE: |
2162 | CODE: |
2171 | if (KLASS_OF (event) != KLASS_MAP) croak ("event class must be MAP"); |
2163 | if (KLASS_OF (event) != KLASS_MAP) croak ("event class must be MAP"); |
2172 | AV *av = (AV *)sv_2mortal ((SV *)newAV ()); |
2164 | AV *av = (AV *)sv_2mortal ((SV *)newAV ()); |
2173 | for (int i = 2; i < items; i++) av_push (av, SvREFCNT_inc (ST (i))); |
2165 | for (int i = 2; i < items; i++) av_push (av, SvREFCNT_inc (ST (i))); |
2174 | RETVAL = INVOKE_((event_type)event, ARG_MAP (map), ARG_AV (av)); |
2166 | RETVAL = INVOKE_((event_type)event, ARG_MAP (map), ARG_AV (av)); |
2175 | OUTPUT: RETVAL |
2167 | OUTPUT: RETVAL |
2176 | |
2168 | |
2177 | SV *registry (mapstruct *map) |
2169 | SV *registry (maptile *map) |
2178 | CODE: |
2170 | CODE: |
2179 | RETVAL = registry_of (map); |
2171 | RETVAL = registry_of (map); |
2180 | OUTPUT: |
2172 | OUTPUT: |
2181 | RETVAL |
2173 | RETVAL |
2182 | |
2174 | |
2183 | INCLUDE: $PERL genacc mapstruct ../include/map.h | |
2175 | INCLUDE: $PERL genacc maptile ../include/map.h | |
2184 | |
2176 | |
2185 | mapstruct *new (int width, int height) |
2177 | maptile *new (int width, int height) |
2186 | PROTOTYPE: |
2178 | PROTOTYPE: |
2187 | CODE: |
2179 | CODE: |
2188 | { |
2180 | { |
2189 | RETVAL = get_empty_map (width, height); |
2181 | RETVAL = get_empty_map (width, height); |
2190 | } |
2182 | } |
2191 | OUTPUT: |
2183 | OUTPUT: |
2192 | RETVAL |
2184 | RETVAL |
2193 | |
2185 | |
2194 | void delete_map (mapstruct *map) |
2186 | void delete_map (maptile *map) |
2195 | |
2187 | |
2196 | void clean_tmp_map (mapstruct *map) |
2188 | void clean_tmp_map (maptile *map) |
2197 | |
2189 | |
2198 | void play_sound_map (mapstruct *map, int x, int y, int sound_num) |
2190 | void play_sound_map (maptile *map, int x, int y, int sound_num) |
2199 | |
2191 | |
2200 | mapstruct *tile_map (mapstruct *map, unsigned int dir) |
2192 | maptile *tile_map (maptile *map, unsigned int dir) |
2201 | CODE: |
2193 | CODE: |
2202 | RETVAL = dir < 4 ? map->tile_map [dir] : 0; |
2194 | RETVAL = dir < 4 ? map->tile_map [dir] : 0; |
2203 | OUTPUT: |
2195 | OUTPUT: |
2204 | RETVAL |
2196 | RETVAL |
2205 | |
2197 | |
2206 | char *tile_path (mapstruct *map, unsigned int dir) |
2198 | char *tile_path (maptile *map, unsigned int dir) |
2207 | CODE: |
2199 | CODE: |
2208 | if (dir >= 4) |
2200 | if (dir >= 4) |
2209 | XSRETURN_UNDEF; |
2201 | XSRETURN_UNDEF; |
2210 | RETVAL = map->tile_path [dir]; |
2202 | RETVAL = map->tile_path [dir]; |
2211 | OUTPUT: |
2203 | OUTPUT: |
2212 | RETVAL |
2204 | RETVAL |
2213 | |
2205 | |
2214 | mapstruct *ready_map_name (char *name, int flags = 0) |
2206 | maptile *ready_map_name (char *name, int flags = 0) |
2215 | PROTOTYPE: $;$ |
2207 | PROTOTYPE: $;$ |
2216 | ALIAS: |
2208 | ALIAS: |
2217 | find = 0 |
2209 | find = 0 |
2218 | get_map = 1 |
2210 | get_map = 1 |
2219 | |
2211 | |
2220 | mapstruct *has_been_loaded (char *name) |
2212 | maptile *has_been_loaded (char *name) |
2221 | PROTOTYPE: $ |
2213 | PROTOTYPE: $ |
2222 | |
2214 | |
2223 | int in_memory (mapstruct *map) |
2215 | int in_memory (maptile *map) |
2224 | CODE: |
2216 | CODE: |
2225 | RETVAL = map->in_memory; |
2217 | RETVAL = map->in_memory; |
2226 | OUTPUT: |
2218 | OUTPUT: |
2227 | RETVAL |
2219 | RETVAL |
2228 | |
2220 | |
2229 | void |
2221 | void |
2230 | trigger (mapstruct *map, long connection, bool state = true) |
2222 | trigger (maptile *map, long connection, bool state = true) |
2231 | CODE: |
2223 | CODE: |
2232 | activate_connection (map, connection, state); |
2224 | activate_connection (map, connection, state); |
2233 | |
2225 | |
2234 | void |
2226 | void |
2235 | get_connection (mapstruct *map, long connection) |
2227 | get_connection (maptile *map, long connection) |
2236 | PPCODE: |
2228 | PPCODE: |
2237 | oblinkpt *obp = get_connection_links (map, connection); |
2229 | oblinkpt *obp = get_connection_links (map, connection); |
2238 | if (obp) |
2230 | if (obp) |
2239 | for (objectlink *ol = obp->link; ol; ol = ol->next) |
2231 | for (objectlink *ol = obp->link; ol; ol = ol->next) |
2240 | XPUSHs (sv_2mortal (newSVcfapi (CFAPI_POBJECT, ol->ob))); |
2232 | XPUSHs (sv_2mortal (newSVcfapi (CFAPI_POBJECT, ol->ob))); |
2241 | |
2233 | |
2242 | object *cf_map_insert_object_there (mapstruct *where, object *op, object *originator, int flags) |
2234 | object *cf_map_insert_object_there (maptile *where, object *op, object *originator, int flags) |
2243 | |
2235 | |
2244 | object *cf_map_insert_object (mapstruct *where, object* op, int x, int y) |
2236 | object *cf_map_insert_object (maptile *where, object* op, int x, int y) |
2245 | |
2237 | |
2246 | object* cf_map_present_arch_by_name (mapstruct *map, const char* str, int nx, int ny) |
2238 | object* cf_map_present_arch_by_name (maptile *map, const char* str, int nx, int ny) |
2247 | C_ARGS: str, map, nx, ny |
2239 | C_ARGS: str, map, nx, ny |
2248 | |
2240 | |
2249 | void |
2241 | void |
2250 | cf_map_normalise (mapstruct *map, int x, int y) |
2242 | cf_map_normalise (maptile *map, int x, int y) |
2251 | PPCODE: |
2243 | PPCODE: |
2252 | { |
2244 | { |
2253 | mapstruct *nmap = 0; |
2245 | maptile *nmap = 0; |
2254 | I16 nx = 0, ny = 0; |
2246 | I16 nx = 0, ny = 0; |
2255 | int flags = get_map_flags (map, &nmap, x, y, &nx, &ny); |
2247 | int flags = get_map_flags (map, &nmap, x, y, &nx, &ny); |
2256 | |
2248 | |
2257 | EXTEND (SP, 4); |
2249 | EXTEND (SP, 4); |
2258 | PUSHs (sv_2mortal (newSViv (flags))); |
2250 | PUSHs (sv_2mortal (newSViv (flags))); |
… | |
… | |
2264 | PUSHs (sv_2mortal (newSViv (ny))); |
2256 | PUSHs (sv_2mortal (newSViv (ny))); |
2265 | } |
2257 | } |
2266 | } |
2258 | } |
2267 | |
2259 | |
2268 | void |
2260 | void |
2269 | at (mapstruct *map, unsigned int x, unsigned int y) |
2261 | at (maptile *map, unsigned int x, unsigned int y) |
2270 | PROTOTYPE: $$$ |
2262 | PROTOTYPE: $$$ |
2271 | PPCODE: |
2263 | PPCODE: |
2272 | { |
2264 | { |
2273 | object *o; |
2265 | object *o; |
2274 | mapstruct *nmap = 0; |
2266 | maptile *nmap = 0; |
2275 | I16 nx, ny; |
2267 | I16 nx, ny; |
2276 | |
2268 | |
2277 | get_map_flags (map, &nmap, x, y, &nx, &ny); |
2269 | get_map_flags (map, &nmap, x, y, &nx, &ny); |
2278 | |
2270 | |
2279 | if (nmap) |
2271 | if (nmap) |
2280 | for (o = GET_MAP_OB (nmap, nx, ny); o; o = o->above) |
2272 | for (o = GET_MAP_OB (nmap, nx, ny); o; o = o->above) |
2281 | XPUSHs (sv_2mortal (newSVcfapi (CFAPI_POBJECT, o))); |
2273 | XPUSHs (sv_2mortal (newSVcfapi (CFAPI_POBJECT, o))); |
2282 | } |
2274 | } |
2283 | |
2275 | |
2284 | SV * |
2276 | SV * |
2285 | bot_at (mapstruct *obj, unsigned int x, unsigned int y) |
2277 | bot_at (maptile *obj, unsigned int x, unsigned int y) |
2286 | PROTOTYPE: $$$ |
2278 | PROTOTYPE: $$$ |
2287 | ALIAS: |
2279 | ALIAS: |
2288 | top_at = 1 |
2280 | top_at = 1 |
2289 | flags_at = 2 |
2281 | flags_at = 2 |
2290 | light_at = 3 |
2282 | light_at = 3 |