I started with modifying the add and remove. But of course it did not work out as expected. I had a lot of faulty assumptions. First of all, add does not always adds to end of the list, and it was obvious actually. I knew Remove does not have to remove from last, what I did not realise was, removing head is not an option. After every modification another problem emerged, and of course a lot of segmantation faults. After days of working, I manage to fix nearly all of the problems, except unable to save or load, and an odd rendering issue. Some of the objects were rendering in wrong order. I tried everything I can think of on sorting, but I could not found the origin of the problem, or anything wrong in the code. On that point I feel I do not have a choice, but surrender.
I may be lost some days, but I start to get how the authors of Cruise were thinking while coding it. There were things that I found strange, like a pointer named plLast, that keeps first node for sorting, but after working on same code parts so long, I get why it was named like that.
I have committed the changes to a new branch, so I can resume working on it anytime I want, and I hope working on other parts will give me a clue about how to fix the issues..
No comments:
Post a Comment