[crossfire] TODO list
Dany Talbot
crystalmir at gmail.com
Thu Jan 14 21:20:57 CST 2010
"move to Qt/C++, to not reinvent the wheel all the time; and massively
clean the code"
such as this:
(naive draft)
(the object superstructure need to be separated into a base 'object'
class - and then you'd have God : Object inheriting from it and adding
stuff specific to God that are in the former object superstructure in
the C code. Also I didn't check the code to rework the function
parameters - that is why it is called a naive draft).
#include <iostream>
#include <global>
#include <living>
#include <object>
#include <spells>
#include <sounds>
// TODO: other includes
/* TODO:
move
* Compares 2 strings.
* @param s1
* @param s2
* strings to compare.
* @return
* 1 if s1 and s2 are the same - either both NULL, or strcmp( ) == 0.
static int same_string(const char *s1, const char *s2) {
if (s1 == NULL)
return s2 == NULL;
else
return s2 != NULL && strcmp(s1, s2) == 0;
}
to an utility function/class
*/
class God : Object
{
public:
// default constructor
Gods();
// default destructor
~Gods();
// operator overload '=='
// operator overload '='
// accesors
// modifiers
Archetype *determine_holy_arch(const Object *god, std::string type);
const God *find_god(std::string name);
const std::string determine_god(Object *op);
int become_follower(Object *op, const Object *new_god);
int tailor_god_spell(Object *spellop, Object *caster);
void pray_at_altar(Object *pl, Object *altar, Object *skill);
private:
const std::string get_god_for_race(std::string race);
int _follower_has_similar_item(Object *op, Object *item);
int _follower_level_to_enchantments(int level, int difficulty);
int _god_enchants_weapon(Object *op, const Object *god, Object
*tr, Object *skill);
int _god_examines_item(const Object *god, Object *item);
int _god_examines_priest(Object *op, const Object *god);
int _god_gives_present(Object *op, const Object *god, Treasure *tr);
int _god_removes_curse(Object *op, int remove_damnation);
int _improve_weapon_magic(Object *op, Object *tr, Object *weapon,
Object *skill);
int _lookup_god_by_name(std::string name);
int _worship_forbids_use(Object *op, Object *exp_obj, uint32 flag,
const std::string string);
void _follower_remove_given_items(Object *pl, Object *op, const
Object *god);
void _god_intervention(Object *op, const Object *god, Object *skill);
void _remove_special_prayers(Object *op, const Object *god);
void _stop_using_item(Object *op, int type, int number);
void _update_priest_flag(const Object *god, Object *exp_ob, uint32 flag);
};
On Thu, Jan 14, 2010 at 5:26 PM, Nicolas Weeger
<nicolas.weeger at laposte.net> wrote:
> Hello.
>
> Considering the low feedback/participation on the list, I'm totally changing
> how I work :)
>
>
> I've put my plans for the future at
> http://wiki.metalforge.net/doku.php/user:ryo:todo and I intend to do them,
> except maybe the "Various" ones.
>
> If you have questions, feel free to ask me (this list or privately), but else
> I'll just implement as I see fit and discuss after if needed :)
>
>
>
> Nicolas
> --
> http://nicolas.weeger.org [Mon p'tit coin du web]
>
> _______________________________________________
> crossfire mailing list
> crossfire at metalforge.org
> http://mailman.metalforge.org/mailman/listinfo/crossfire
>
>
--
Dany Talbot, Quebec, Canada [ Crystalmir at gmail.com ]
"Per aspera ad astra"
More information about the crossfire
mailing list