Ok well in the start of the combat system it locates like if your hand to
hand melee or ranged.

It finds that and then sends you to that function now for melee and ranged
that will locate your weapon and then pass you to a like attack_melee
function that figurs the damage and everything. That then passes all the
info to a (not sure what to call it) a function in the victims struct called
attacked that gives it
ch->fighting->attacked(ch, sn, dam_type, dam, ATTACK_MELEE, wield);

ok then that will call all the like block dodge all that and then call
damage. All the while it just kind of keeps stock pilling on all these
parameters that it's sending. So what I was wondering is rather then
collecting all this info and passing it as I go. Would it be smarter to make
like an attack object that had all this infor to it. And then just run
through the functions with a pointer on the char to the attack object?

----- Original Message ----- 
From: "Chad Simmons" <[EMAIL PROTECTED]>
To: "Dale Kingston" <[EMAIL PROTECTED]>
Cc: <[email protected]>
Sent: Tuesday, August 19, 2003 1:07 AM
Subject: Re: Question (of course)


>
> --- Dale Kingston <[EMAIL PROTECTED]> wrote:
> > Which would be faster... to pass arguments, or to create an object that
gets
> > passed? With my combat system I have it calling alot of functions with
the
> > same or simular arguments passing all the same values as it goes.... So
> > which would be wise? Making an attack object that would be passed or
> > continue to pass these arguments?
>
> It would really depend on what you were doing. Cite some examples, and
perhaps
> we could give you a better solution.
>
> Thanks,
> ~Kender
>
> =====
> -----BEGIN GEEK CODE BLOCK-----
> Version 3.1
> GCS/L/C/O d-(+) s++: a-- C+++$>++++ UBLS++++$
> P+++(--)$ L+++>++++ E--- W+>++$ N !o K? w(--) !O
> M- !V PS+ PE(++) Y+ PGP->+ t+ 5 X+() R(+) tv+@
> b++(+++) !DI+++ D G(-) e>+++$ h---() r+++ y+++
> ------END GEEK CODE BLOCK------
>
> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free, easy-to-use web site design software
> http://sitebuilder.yahoo.com
>
> -- 
> ROM mailing list
> [email protected]
> http://www.rom.org/cgi-bin/mailman/listinfo/rom
>


Reply via email to