Krice
Arcane
- Joined
- May 29, 2010
- Messages
- 1,361
Cleaning up the 'object' struct which is item game object is quite tedious. The way items are created is a mess, because the data in 'object' is set in many places and many ways. Some variables in 'object' are problematic, like o_ac which is used in more ways than just the ac of the item. The o_group variable is a mystery, it seems to be given to item stacks, but I'm not sure why. Then there is o_launch which stores the item that is used to shoot that item. For example if the item is arrow then o_launch will be a bow. But there are only three items you can shoot with and for the rest of items o_launch is useless. It would be much easier to write a member function to determine which item you need to shoot those three projectiles. Which I did, but didn't yet remove o_launch. The way this game is using data is primitive, because you don't really need to store that kind of data in the item class, you could use the static data for items to determine that kind of stuff.