… | |
… | |
442 | "use cf;" |
442 | "use cf;" |
443 | }; |
443 | }; |
444 | |
444 | |
445 | perl = perl_alloc (); |
445 | perl = perl_alloc (); |
446 | perl_construct (perl); |
446 | perl_construct (perl); |
|
|
447 | |
|
|
448 | PL_exit_flags |= PERL_EXIT_DESTRUCT_END; |
447 | |
449 | |
448 | if (perl_parse (perl, xs_init, 2, argv, (char **)NULL) || perl_run (perl)) |
450 | if (perl_parse (perl, xs_init, 2, argv, (char **)NULL) || perl_run (perl)) |
449 | { |
451 | { |
450 | printf ("unable to initialize perl-interpreter, continuing without.\n"); |
452 | printf ("unable to initialize perl-interpreter, continuing without.\n"); |
451 | |
453 | |
… | |
… | |
1127 | const_iv (SOUND_CLOCK) |
1129 | const_iv (SOUND_CLOCK) |
1128 | const_iv (SOUND_TURN_HANDLE) |
1130 | const_iv (SOUND_TURN_HANDLE) |
1129 | const_iv (SOUND_FALL_HOLE) |
1131 | const_iv (SOUND_FALL_HOLE) |
1130 | const_iv (SOUND_DRINK_POISON) |
1132 | const_iv (SOUND_DRINK_POISON) |
1131 | const_iv (SOUND_CAST_SPELL_0) |
1133 | const_iv (SOUND_CAST_SPELL_0) |
|
|
1134 | |
|
|
1135 | const_iv (MAP_FLUSH) |
|
|
1136 | const_iv (MAP_PLAYER_UNIQUE) |
|
|
1137 | const_iv (MAP_BLOCK) |
|
|
1138 | const_iv (MAP_STYLE) |
|
|
1139 | const_iv (MAP_OVERLAY) |
|
|
1140 | |
|
|
1141 | const_iv (MAP_IN_MEMORY) |
|
|
1142 | const_iv (MAP_SWAPPED) |
|
|
1143 | const_iv (MAP_LOADING) |
|
|
1144 | const_iv (MAP_SAVING) |
1132 | }; |
1145 | }; |
1133 | |
1146 | |
1134 | for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) |
1147 | for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) |
1135 | newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); |
1148 | newCONSTSUB (stash, (char *)civ->name, newSViv (civ->iv)); |
1136 | |
1149 | |
… | |
… | |
1324 | void |
1337 | void |
1325 | LOG (int level, char *msg) |
1338 | LOG (int level, char *msg) |
1326 | PROTOTYPE: $$ |
1339 | PROTOTYPE: $$ |
1327 | C_ARGS: level, "%s", msg |
1340 | C_ARGS: level, "%s", msg |
1328 | |
1341 | |
|
|
1342 | char *path_combine (char *base, char *path) |
|
|
1343 | PROTOTYPE: $$ |
|
|
1344 | |
|
|
1345 | char *path_combine_and_normalize (char *base, char *path) |
|
|
1346 | PROTOTYPE: $$ |
|
|
1347 | |
1329 | char * |
1348 | char * |
1330 | cf_get_maps_directory (char *path) |
1349 | cf_get_maps_directory (char *path) |
1331 | PROTOTYPE: $ |
1350 | PROTOTYPE: $ |
1332 | ALIAS: maps_directory = 0 |
1351 | ALIAS: maps_directory = 0 |
1333 | |
1352 | |
… | |
… | |
1758 | |
1777 | |
1759 | mapstruct *cf_map_get_map (char *name) |
1778 | mapstruct *cf_map_get_map (char *name) |
1760 | PROTOTYPE: $ |
1779 | PROTOTYPE: $ |
1761 | ALIAS: map = 0 |
1780 | ALIAS: map = 0 |
1762 | |
1781 | |
|
|
1782 | mapstruct *has_been_loaded (char *name) |
|
|
1783 | PROTOTYPE: $ |
|
|
1784 | |
1763 | mapstruct *cf_map_get_first () |
1785 | mapstruct *cf_map_get_first () |
1764 | PROTOTYPE: |
1786 | PROTOTYPE: |
1765 | ALIAS: first = 0 |
1787 | ALIAS: first = 0 |
1766 | |
1788 | |
1767 | # whoever "designed" the plug-in api should have wasted |
1789 | # whoever "designed" the plug-in api should have wasted |
1768 | # his/her time with staying away form the project - would have |
1790 | # his/her time with staying away from the project - would have |
1769 | # saved others a lot of time, without doubt. |
1791 | # saved others a lot of time, without doubt. |
1770 | void set_path (mapstruct *where, char *path) |
1792 | void set_path (mapstruct *where, char *path) |
1771 | CODE: |
1793 | CODE: |
1772 | strcpy (where->path, path); |
1794 | strcpy (where->path, path); |
|
|
1795 | |
|
|
1796 | int in_memory (mapstruct *map) |
|
|
1797 | CODE: |
|
|
1798 | RETVAL = map->in_memory; |
|
|
1799 | OUTPUT: |
|
|
1800 | RETVAL |
1773 | |
1801 | |
1774 | bool unique (mapstruct *map) |
1802 | bool unique (mapstruct *map) |
1775 | CODE: |
1803 | CODE: |
1776 | RETVAL = map->unique; |
1804 | RETVAL = map->unique; |
1777 | OUTPUT: |
1805 | OUTPUT: |