ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/server/cfperl.xs
(Generate patch)

Comparing deliantra/server/server/cfperl.xs (file contents):
Revision 1.73 by root, Mon Dec 11 22:56:57 2006 UTC vs.
Revision 1.74 by root, Mon Dec 11 23:35:37 2006 UTC

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

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines