… | |
… | |
1418 | prop (CFAPI_INT, MAP_PROP_WINDDIR) |
1418 | prop (CFAPI_INT, MAP_PROP_WINDDIR) |
1419 | prop (CFAPI_INT, MAP_PROP_SKY) |
1419 | prop (CFAPI_INT, MAP_PROP_SKY) |
1420 | prop (CFAPI_INT, MAP_PROP_WPARTX) |
1420 | prop (CFAPI_INT, MAP_PROP_WPARTX) |
1421 | prop (CFAPI_INT, MAP_PROP_WPARTY) |
1421 | prop (CFAPI_INT, MAP_PROP_WPARTY) |
1422 | prop (CFAPI_STRING, MAP_PROP_MESSAGE) |
1422 | prop (CFAPI_STRING, MAP_PROP_MESSAGE) |
1423 | prop (CFAPI_PMAP, MAP_PROP_NEXT) |
|
|
1424 | prop (CFAPI_PREGION, MAP_PROP_REGION) |
1423 | prop (CFAPI_PREGION, MAP_PROP_REGION) |
1425 | prop (CFAPI_POBJECT, OBJECT_PROP_NEXT_ACTIVE_OB) |
1424 | prop (CFAPI_POBJECT, OBJECT_PROP_NEXT_ACTIVE_OB) |
1426 | prop (CFAPI_POBJECT, OBJECT_PROP_PREV_ACTIVE_OB) |
1425 | prop (CFAPI_POBJECT, OBJECT_PROP_PREV_ACTIVE_OB) |
1427 | prop (CFAPI_POBJECT, OBJECT_PROP_INVENTORY) |
1426 | prop (CFAPI_POBJECT, OBJECT_PROP_INVENTORY) |
1428 | prop (CFAPI_POBJECT, OBJECT_PROP_ENVIRONMENT) |
1427 | prop (CFAPI_POBJECT, OBJECT_PROP_ENVIRONMENT) |
… | |
… | |
2129 | OUTPUT: RETVAL |
2128 | OUTPUT: RETVAL |
2130 | |
2129 | |
2131 | |
2130 | |
2132 | MODULE = cf PACKAGE = cf::map PREFIX = cf_map_ |
2131 | MODULE = cf PACKAGE = cf::map PREFIX = cf_map_ |
2133 | |
2132 | |
2134 | void |
2133 | mapstruct *first () |
2135 | trigger (mapstruct *map, long connection, bool state = true) |
2134 | PROTOTYPE: |
2136 | CODE: |
|
|
2137 | activate_connection (map, connection, state); |
|
|
2138 | |
|
|
2139 | void |
|
|
2140 | get_connection (mapstruct *map, long connection) |
|
|
2141 | PPCODE: |
2135 | CODE: |
2142 | { |
2136 | RETVAL = first_map; |
2143 | oblinkpt *obp = get_connection_links (map, connection); |
2137 | OUTPUT: RETVAL |
2144 | if (obp) |
2138 | |
2145 | for (objectlink *ol = obp->link; ol; ol = ol->next) |
2139 | mapstruct *next (mapstruct *map) |
2146 | XPUSHs (sv_2mortal (newSVcfapi (CFAPI_POBJECT, ol->ob))); |
2140 | PROTOTYPE: |
2147 | } |
2141 | CODE: |
|
|
2142 | RETVAL = map->next; |
|
|
2143 | OUTPUT: RETVAL |
2148 | |
2144 | |
2149 | int invoke (mapstruct *map, int event, ...) |
2145 | int invoke (mapstruct *map, int event, ...) |
2150 | CODE: |
2146 | CODE: |
2151 | if (KLASS_OF (event) != KLASS_MAP) croak ("event class must be MAP"); |
2147 | if (KLASS_OF (event) != KLASS_MAP) croak ("event class must be MAP"); |
2152 | AV *av = (AV *)sv_2mortal ((SV *)newAV ()); |
2148 | AV *av = (AV *)sv_2mortal ((SV *)newAV ()); |
… | |
… | |
2180 | |
2176 | |
2181 | mapstruct *new (int width, int height) |
2177 | mapstruct *new (int width, int height) |
2182 | PROTOTYPE: |
2178 | PROTOTYPE: |
2183 | CODE: |
2179 | CODE: |
2184 | { |
2180 | { |
2185 | int unused_type; |
2181 | RETVAL = get_empty_map (width, height); |
2186 | RETVAL = (mapstruct*) map_get_map (&unused_type, 0, width, height); |
|
|
2187 | } |
2182 | } |
2188 | OUTPUT: |
2183 | OUTPUT: |
2189 | RETVAL |
2184 | RETVAL |
2190 | |
2185 | |
2191 | void delete_map (mapstruct *map) |
2186 | void delete_map (mapstruct *map) |
… | |
… | |
2206 | XSRETURN_UNDEF; |
2201 | XSRETURN_UNDEF; |
2207 | RETVAL = map->tile_path [dir]; |
2202 | RETVAL = map->tile_path [dir]; |
2208 | OUTPUT: |
2203 | OUTPUT: |
2209 | RETVAL |
2204 | RETVAL |
2210 | |
2205 | |
2211 | mapstruct *cf_map_get_map (char *name) |
2206 | mapstruct *ready_map_name (char *name, int flags = 0) |
2212 | PROTOTYPE: $ |
2207 | PROTOTYPE: $;$ |
2213 | ALIAS: map = 0 |
2208 | ALIAS: |
|
|
2209 | find = 0 |
|
|
2210 | get_map = 1 |
2214 | |
2211 | |
2215 | mapstruct *has_been_loaded (char *name) |
2212 | mapstruct *has_been_loaded (char *name) |
2216 | PROTOTYPE: $ |
2213 | PROTOTYPE: $ |
2217 | |
|
|
2218 | mapstruct *cf_map_get_first () |
|
|
2219 | PROTOTYPE: |
|
|
2220 | ALIAS: first = 0 |
|
|
2221 | |
2214 | |
2222 | # whoever "designed" the plug-in api should have wasted |
2215 | # whoever "designed" the plug-in api should have wasted |
2223 | # his/her time with staying away from the project - would have |
2216 | # his/her time with staying away from the project - would have |
2224 | # saved others a lot of time, without doubt. |
2217 | # saved others a lot of time, without doubt. |
2225 | void set_path (mapstruct *where, char *path) |
2218 | void set_path (mapstruct *where, char *path) |
… | |
… | |
2239 | RETVAL |
2232 | RETVAL |
2240 | |
2233 | |
2241 | void set_unique (mapstruct *map, bool unique) |
2234 | void set_unique (mapstruct *map, bool unique) |
2242 | CODE: |
2235 | CODE: |
2243 | map->unique = unique; |
2236 | map->unique = unique; |
|
|
2237 | |
|
|
2238 | void |
|
|
2239 | trigger (mapstruct *map, long connection, bool state = true) |
|
|
2240 | CODE: |
|
|
2241 | activate_connection (map, connection, state); |
|
|
2242 | |
|
|
2243 | void |
|
|
2244 | get_connection (mapstruct *map, long connection) |
|
|
2245 | PPCODE: |
|
|
2246 | oblinkpt *obp = get_connection_links (map, connection); |
|
|
2247 | if (obp) |
|
|
2248 | for (objectlink *ol = obp->link; ol; ol = ol->next) |
|
|
2249 | XPUSHs (sv_2mortal (newSVcfapi (CFAPI_POBJECT, ol->ob))); |
2244 | |
2250 | |
2245 | object *cf_map_insert_object_there (mapstruct *where, object *op, object *originator, int flags) |
2251 | object *cf_map_insert_object_there (mapstruct *where, object *op, object *originator, int flags) |
2246 | |
2252 | |
2247 | object *cf_map_insert_object (mapstruct *where, object* op, int x, int y) |
2253 | object *cf_map_insert_object (mapstruct *where, object* op, int x, int y) |
2248 | |
2254 | |