… | |
… | |
243 | |
243 | |
244 | // now bless the object _once_ |
244 | // now bless the object _once_ |
245 | return sv_bless (newRV_inc ((SV *)obj->self), stash); |
245 | return sv_bless (newRV_inc ((SV *)obj->self), stash); |
246 | } |
246 | } |
247 | else |
247 | else |
|
|
248 | { |
248 | return newRV_inc ((SV *)obj->self); |
249 | SV *sv = newRV_inc ((SV *)obj->self); |
|
|
250 | |
|
|
251 | if (Gv_AMG (stash)) // handle overload correctly, as the perl core does not |
|
|
252 | SvAMAGIC_on (sv); |
|
|
253 | |
|
|
254 | return sv; |
|
|
255 | } |
249 | } |
256 | } |
250 | |
257 | |
251 | static void |
258 | static void |
252 | clearSVptr (SV *sv) |
259 | clearSVptr (SV *sv) |
253 | { |
260 | { |
… | |
… | |
2118 | |
2125 | |
2119 | object* cf_map_present_arch_by_name (maptile *map, const char* str, int nx, int ny) |
2126 | object* cf_map_present_arch_by_name (maptile *map, const char* str, int nx, int ny) |
2120 | C_ARGS: str, map, nx, ny |
2127 | C_ARGS: str, map, nx, ny |
2121 | |
2128 | |
2122 | void |
2129 | void |
2123 | cf_map_normalise (maptile *map, int x, int y) |
2130 | get_map_flags (maptile *map, int x, int y) |
2124 | PPCODE: |
2131 | PPCODE: |
2125 | { |
2132 | { |
2126 | maptile *nmap = 0; |
2133 | maptile *nmap = 0; |
2127 | I16 nx = 0, ny = 0; |
2134 | I16 nx = 0, ny = 0; |
2128 | int flags = get_map_flags (map, &nmap, x, y, &nx, &ny); |
2135 | int flags = get_map_flags (map, &nmap, x, y, &nx, &ny); |
… | |
… | |
2190 | CODE: |
2197 | CODE: |
2191 | RETVAL = get_name_of_region_for_map (m); |
2198 | RETVAL = get_name_of_region_for_map (m); |
2192 | OUTPUT: RETVAL |
2199 | OUTPUT: RETVAL |
2193 | |
2200 | |
2194 | # worst xs function of my life |
2201 | # worst xs function of my life |
2195 | maptile * |
2202 | bool |
2196 | _create_random_map (\ |
2203 | _create_random_map (\ |
2197 | char *path,\ |
2204 | maptile *self,\ |
2198 | char *wallstyle,\ |
2205 | char *wallstyle,\ |
2199 | char *wall_name,\ |
2206 | char *wall_name,\ |
2200 | char *floorstyle,\ |
2207 | char *floorstyle,\ |
2201 | char *monsterstyle,\ |
2208 | char *monsterstyle,\ |
2202 | char *treasurestyle,\ |
2209 | char *treasurestyle,\ |
… | |
… | |
2272 | rmp.treasureoptions = treasureoptions; |
2279 | rmp.treasureoptions = treasureoptions; |
2273 | rmp.symmetry_used = symmetry_used; |
2280 | rmp.symmetry_used = symmetry_used; |
2274 | rmp.region = region; |
2281 | rmp.region = region; |
2275 | rmp.custom = custom; |
2282 | rmp.custom = custom; |
2276 | |
2283 | |
2277 | RETVAL = generate_random_map (path, &rmp); |
2284 | RETVAL = self->generate_random_map (&rmp); |
2278 | } |
2285 | } |
2279 | OUTPUT: |
2286 | OUTPUT: |
2280 | RETVAL |
2287 | RETVAL |
2281 | |
2288 | |
2282 | MODULE = cf PACKAGE = cf::arch |
2289 | MODULE = cf PACKAGE = cf::arch |