Friday, June 3, 2011
...Insert Title Here...
So last night was rather fun then frustrating. I did something insane, to me, programming wise that worked. I actually put pointers to the array a class is in, in the class. And it worked. I had to for the producers to work or it was at least my fix. Since I couldn't tag an image with an array. Not surprising really but it meant that I couldn't an array of producers to an image to link for float over. Since the images and the actual item are two different things it created a bit of an issue. My solution was to add an id number to them matching the id number of the item in the array. But that added one new problem... what array do I look in for the ID number? add a pointer and were done. But still some weird backwards logic. I'm sure there was a better answer and someone is going to give me a complicated correct one, that I don't understand. But my way works.
Definitely think my programming has gone up a few more levels in the last weeks.
Then of course I tried to implement into the main game. And everything broke... for some reason the sorter is converting all my classes in the array into strings... I still don't know why its tonight's project. Then hopefully once that is up and running can get the stacker working.