… | |
… | |
1043 | cfperl_result_INT (int idx) |
1043 | cfperl_result_INT (int idx) |
1044 | { |
1044 | { |
1045 | return SvIV (cfperl_result (idx)); |
1045 | return SvIV (cfperl_result (idx)); |
1046 | } |
1046 | } |
1047 | |
1047 | |
1048 | int |
1048 | double |
1049 | cfperl_result_DOUBLE (int idx) |
1049 | cfperl_result_DOUBLE (int idx) |
1050 | { |
1050 | { |
1051 | return SvNV (cfperl_result (idx)); |
1051 | return SvNV (cfperl_result (idx)); |
1052 | } |
1052 | } |
1053 | |
1053 | |
… | |
… | |
1656 | } |
1656 | } |
1657 | OUTPUT: RETVAL |
1657 | OUTPUT: RETVAL |
1658 | |
1658 | |
1659 | void _exit (int status = 0) |
1659 | void _exit (int status = 0) |
1660 | |
1660 | |
1661 | int cf_find_animation (char *text) |
1661 | int find_animation (char *text) |
1662 | PROTOTYPE: $ |
1662 | PROTOTYPE: $ |
1663 | |
1663 | |
1664 | int random_roll(int min, int max, object *op, int goodbad); |
1664 | int random_roll (int min, int max, object *op, int goodbad); |
1665 | |
1665 | |
1666 | const char *cost_string_from_value(uint64 cost, int approx = 0) |
1666 | const char *cost_string_from_value(uint64 cost, int approx = 0) |
1667 | |
1667 | |
1668 | int invoke (int event, ...) |
1668 | int invoke (int event, ...) |
1669 | CODE: |
1669 | CODE: |
… | |
… | |
1785 | |
1785 | |
1786 | object *find_best_object_match (object *op, const char *match) |
1786 | object *find_best_object_match (object *op, const char *match) |
1787 | |
1787 | |
1788 | object *find_marked_object (object *op) |
1788 | object *find_marked_object (object *op) |
1789 | |
1789 | |
1790 | int cf_object_get_resistance (object *op, int rtype) |
1790 | int resistance (object *op, int rtype, int newval = 0) |
1791 | ALIAS: resistance = 0 |
1791 | CODE: |
|
|
1792 | if (rtype < 0 || rtype >= NROFATTACKS) |
|
|
1793 | croak ("resistance out of bounds"); |
|
|
1794 | RETVAL = op->resist [rtype]; |
|
|
1795 | if (items >= 3) |
|
|
1796 | op->resist [rtype] = newval; |
|
|
1797 | OUTPUT: RETVAL |
|
|
1798 | |
|
|
1799 | void set_resistance (object *op, int rtype, int val) |
|
|
1800 | CODE: |
|
|
1801 | if (rtype < 0 || rtype >= NROFATTACKS) |
|
|
1802 | op->resist[rtype] = val; |
1792 | |
1803 | |
1793 | int need_identify (const object *obj); |
1804 | int need_identify (const object *obj); |
1794 | |
1805 | |
1795 | int apply_shop_mat (object *shop_mat, object *op); |
1806 | int apply_shop_mat (object *shop_mat, object *op); |
1796 | |
1807 | |
… | |
… | |
1798 | CODE: |
1809 | CODE: |
1799 | RETVAL = move_ob (op, dir, originator); |
1810 | RETVAL = move_ob (op, dir, originator); |
1800 | OUTPUT: |
1811 | OUTPUT: |
1801 | RETVAL |
1812 | RETVAL |
1802 | |
1813 | |
1803 | void cf_object_apply (object *op, object *author, int flags = 0) |
1814 | void apply (object *applier, object *applied, int flags = 0) |
|
|
1815 | CODE: |
|
|
1816 | manual_apply (applied, applier, flags); |
1804 | |
1817 | |
1805 | void cf_object_apply_below (object *op) |
1818 | void apply_below (object *op) |
|
|
1819 | CODE: |
|
|
1820 | player_apply_below (op); |
1806 | |
1821 | |
1807 | void cf_object_remove (object *op) |
1822 | void remove (object *op) |
|
|
1823 | CODE: |
|
|
1824 | op->remove (); |
1808 | |
1825 | |
1809 | void cf_object_free (object *op) |
1826 | void destroy (object *op, int recursive = 0) |
|
|
1827 | CODE: |
|
|
1828 | op->destroy (recursive); |
1810 | |
1829 | |
1811 | object *cf_object_present_archname_inside (object *op, char *whatstr) |
1830 | object *cf_object_present_archname_inside (object *op, char *whatstr) |
1812 | |
1831 | |
1813 | int cf_object_transfer (object *op, int x, int y, int r = 0, object_ornull *orig = 0) |
1832 | int cf_object_transfer (object *op, int x, int y, int r = 0, object_ornull *orig = 0) |
1814 | |
1833 | |
1815 | int cf_object_change_map (object *op, int x, int y, maptile *map) |
1834 | int cf_object_change_map (object *op, int x, int y, maptile *map) |
1816 | |
1835 | |
1817 | object *cf_object_clone (object *op, int clonetype = 0) |
1836 | object *clone (object *op, int recursive = 0) |
|
|
1837 | CODE: |
|
|
1838 | if (recursive) |
|
|
1839 | RETVAL = object_create_clone (op); |
|
|
1840 | else |
|
|
1841 | { |
|
|
1842 | RETVAL = object::create (); |
|
|
1843 | copy_object (op, RETVAL); |
|
|
1844 | } |
|
|
1845 | OUTPUT: RETVAL |
1818 | |
1846 | |
1819 | int cf_object_pay_item (object *op, object *buyer) |
1847 | int pay_item (object *op, object *buyer) |
|
|
1848 | CODE: |
|
|
1849 | RETVAL = pay_for_item (op, buyer); |
|
|
1850 | OUTPUT: RETVAL |
1820 | |
1851 | |
1821 | int cf_object_pay_amount (object *op, uint64 amount) |
1852 | int pay_amount (object *op, uint64 amount) |
|
|
1853 | CODE: |
|
|
1854 | RETVAL = pay_for_amount (amount, op); |
|
|
1855 | OUTPUT: RETVAL |
1822 | |
1856 | |
1823 | void pay_player (object *op, uint64 amount) |
1857 | void pay_player (object *op, uint64 amount) |
1824 | |
1858 | |
1825 | val64 pay_player_arch (object *op, const char *arch, uint64 amount) |
1859 | val64 pay_player_arch (object *op, const char *arch, uint64 amount) |
1826 | |
1860 | |
1827 | int cf_object_cast_spell (object *caster, object *ctoo, int dir, object *spell_ob, char *stringarg = 0) |
1861 | int cast_spell (object *op, object *caster, int dir, object *spell_ob, char *stringarg = 0) |
1828 | |
1862 | |
1829 | int cf_object_cast_ability (object *caster, object *ctoo, int dir, object *sp_, char *stringarg = 0) |
1863 | void learn_spell (object *op, object *sp, int special_prayer = 0) |
|
|
1864 | CODE: |
|
|
1865 | do_learn_spell (op, sp, special_prayer); |
1830 | |
1866 | |
1831 | void cf_object_learn_spell (object *op, object *sp) |
|
|
1832 | |
|
|
1833 | void cf_object_forget_spell (object *op, object *sp) |
1867 | void forget_spell (object *op, object *sp) |
|
|
1868 | CODE: |
|
|
1869 | do_forget_spell (op, query_name (sp)); |
1834 | |
1870 | |
1835 | object *cf_object_check_for_spell (object *op, char *spellname) |
1871 | object *check_for_spell (object *op, char *spellname) |
|
|
1872 | CODE: |
|
|
1873 | RETVAL = check_spell_known (op, spellname); |
|
|
1874 | OUTPUT: RETVAL |
1836 | |
1875 | |
1837 | int cf_object_query_money (object *op) |
1876 | int query_money (object *op) |
1838 | ALIAS: money = 0 |
1877 | ALIAS: money = 0 |
1839 | |
1878 | |
1840 | int cf_object_query_cost (object *op, object *who, int flags) |
1879 | int query_cost (object *op, object *who, int flags) |
1841 | ALIAS: cost = 0 |
1880 | ALIAS: cost = 0 |
1842 | |
1881 | |
1843 | void cf_object_activate_rune (object *op , object *victim) |
1882 | void spring_trap (object *op, object *victim) |
1844 | |
1883 | |
1845 | int cf_object_check_trigger (object *op, object *cause) |
1884 | int check_trigger (object *op, object *cause) |
1846 | |
1885 | |
1847 | int cf_object_out_of_map (object *op, int x, int y) |
|
|
1848 | |
|
|
1849 | void cf_object_drop (object *op, object *author) |
1886 | void drop (object *who, object *op) |
1850 | |
1887 | |
1851 | void cf_object_take (object *op, object *author) |
1888 | void pick_up (object *who, object *op) |
1852 | |
1889 | |
1853 | object *cf_object_insert_object (object *op, object *container) |
1890 | object *cf_object_insert_object (object *op, object *container) |
1854 | |
1891 | |
1855 | object *cf_object_insert_in_ob (object *ob, object *where) |
1892 | object *cf_object_insert_in_ob (object *ob, object *where) |
1856 | |
1893 | |
1857 | int cf_object_teleport (object *op, maptile *map, int x, int y) |
1894 | int cf_object_teleport (object *op, maptile *map, int x, int y) |
1858 | |
1895 | |
1859 | void cf_object_update (object *op, int flags) |
1896 | void update (object *op, int action) |
1860 | |
1897 | CODE: |
1861 | void cf_object_pickup (object *op, object *what) |
1898 | update_object (op, action); |
1862 | |
1899 | |
1863 | object *cf_create_object_by_name (const char *name) |
1900 | object *cf_create_object_by_name (const char *name) |
1864 | |
1901 | |
1865 | void change_exp (object *op, uint64 exp, const char *skill_name = 0, int flag = 0) |
1902 | void change_exp (object *op, uint64 exp, const char *skill_name = 0, int flag = 0) |
1866 | |
1903 | |
… | |
… | |
1875 | void use_trigger (object *op); |
1912 | void use_trigger (object *op); |
1876 | |
1913 | |
1877 | void add_button_link (object *button, maptile *map, int connected); |
1914 | void add_button_link (object *button, maptile *map, int connected); |
1878 | |
1915 | |
1879 | void remove_button_link (object *op); |
1916 | void remove_button_link (object *op); |
1880 | |
|
|
1881 | void |
|
|
1882 | cf_object_set_resistance (object *op, int rtype, int val) |
|
|
1883 | CODE: |
|
|
1884 | if (rtype >= 0 && rtype < NROFATTACKS) |
|
|
1885 | op->resist[rtype] = val; |
|
|
1886 | |
1917 | |
1887 | |
1918 | |
1888 | MODULE = cf PACKAGE = cf::object PREFIX = cf_ |
1919 | MODULE = cf PACKAGE = cf::object PREFIX = cf_ |
1889 | |
1920 | |
1890 | void cf_fix_object (object *pl) |
1921 | void cf_fix_object (object *pl) |
… | |
… | |
2164 | |
2195 | |
2165 | void clean_tmp_map (maptile *map) |
2196 | void clean_tmp_map (maptile *map) |
2166 | |
2197 | |
2167 | void play_sound_map (maptile *map, int x, int y, int sound_num) |
2198 | void play_sound_map (maptile *map, int x, int y, int sound_num) |
2168 | |
2199 | |
|
|
2200 | int out_of_map (maptile *map, int x, int y) |
|
|
2201 | |
2169 | maptile *tile_map (maptile *map, unsigned int dir) |
2202 | maptile *tile_map (maptile *map, unsigned int dir) |
2170 | CODE: |
2203 | CODE: |
2171 | RETVAL = dir < 4 ? map->tile_map [dir] : 0; |
2204 | RETVAL = dir < 4 ? map->tile_map [dir] : 0; |
2172 | OUTPUT: |
2205 | OUTPUT: |
2173 | RETVAL |
2206 | RETVAL |