PackUpdate and extending the Item class (parent enum private)
by David Schwanke · in Torque Game Engine · 06/14/2004 (3:21 pm) · 3 replies
Alrighty, got myself deep into extending the item class and learning mostly by example and etherial code perception I got to the point of my first dry compile process and learned something interesting.
In all of the parents to the item class the enumerated bitMasks for the packUpdate function are public EXCEPT for the one in Item.
Its private and of course means without changing Item I cant extend it.
My question is, is there a special reason why this particular class has it private? Or is it simply no one figured we would extend it?
I counted the number of masks on up the tree and I dont even think it reached 16 so its not a limit issue I dont think.
If for some reason it cant be changed (breaks too many other things) then any suggestions on how to extend the pack/unpack-update functions?
I have some ideas brewing that I havnt put into thought yet but I wanted to possibliy find out if its just easier for me to move the enum to public and have the extended pack/unpacks be like all the rest using Parent::NextFreeMask.
Thanks in advance. Kind of strange to me.
In all of the parents to the item class the enumerated bitMasks for the packUpdate function are public EXCEPT for the one in Item.
Its private and of course means without changing Item I cant extend it.
My question is, is there a special reason why this particular class has it private? Or is it simply no one figured we would extend it?
I counted the number of masks on up the tree and I dont even think it reached 16 so its not a limit issue I dont think.
If for some reason it cant be changed (breaks too many other things) then any suggestions on how to extend the pack/unpack-update functions?
I have some ideas brewing that I havnt put into thought yet but I wanted to possibliy find out if its just easier for me to move the enum to public and have the extended pack/unpacks be like all the rest using Parent::NextFreeMask.
Thanks in advance. Kind of strange to me.
Associate Kyle Carter