Monday 9 September 2019

Coordinates rewrite

Each object used to store coordinate data, but for objects that don't move I thought having that data in the object itself was a waste of space. Obviously there has been complications when coordinates were removed from some object types. The way I'm storing game objects are in a list, because it's an easy way to keep them in ownership of the level. The display map is doing most of the work by having only handles to visible objects.

Since items (those items you pick up in the game) work a bit different way I have to write a unique list for them. The generic list did have some static_casts to item class for that reason and I guess it's good to remove those routines. There are some other object types that use coordinates in that context, but they are easier to fix I think.

There is also a change in the way I'm documenting issues in the source code. I used to write "note:" followed by explanation in the source code, but those seem to disappear in the code. I think it's better to create an issue list with number for each issue and then fix them the same way as bugs. That way you can see the list growing and if you don't do anything it's going to be infinitely long.