--- [EMAIL PROTECTED] wrote: > Thanks for the help. I went with the wrapper method and things seem to be > working out great! Now I just need my builders to start adding these > things to weapons! I didn't do it exactly like how you describe, I more or > less just duplicated the whole damage function and dam_message function and > added my custom bits; it occurred to me that there had to be a way to > consolidate them but it hadn't occurred to me until I read this. I'll be > changing that soon since my fight.c file seems bloated now (~130k)
Yeah, generally copying code is a bad idea. If there are bugs, you've suddenly duplicated them, so once they are discovered you'll have to remember to change them in 2 different places, etc. It just becomes a maintenance nightmare. Much better to simply call existing functions to do what you need. > Good good, with items having 10 values, in area files I'm reading in the last > value in as a string then depending on the item type I either store it in a > non-type specific char pointer or pass it through atoi and store the value in > 'value[9]'. I don't generally recommend doing this sort of thing, as it becomes difficult later on to remember the magic formula for how this works. Again maintenance nightmare. It's much more important to do a little extra work and have everything be as consistant as possible. > Would it make any difference if the string was on its own line as opposed to > the end of another line? Same answer. Try to go for consistancy. It will make debugging and updating much easier in the long term. HTH, ~Kender -----BEGIN GEEK CODE BLOCK----- Version 3.12 GCS/IT/L/S/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!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- ROM mailing list [email protected] Unsubscribe here ->>> http://www.rom.org/cgi-bin/mailman/listinfo/rom

