In the original game, when the player presses the key X, all the exit locations of the current location will be pointed out with a symbol on it. To achieve this, I need to find which PATTable (the object that contains info of a clicking area) has the exit action, get its location, and render a symbol on it. It sounds easy, but the OO structure of the game engine warps it in a pretty complex way and I have to open interfaces in many classes. After doing so, I started to understand that why people are being more critical to OO design and FP is getting more popular. You really need to know how to balance things. Also, it took me some time to verify the exact location of the symbol to be drawn.
See the exit symbol on the door? |
As for the dialog panel, I made a wrong assumption in my previous implementation: assuming that all dialog options will be only one line. Yet taking the fact that an option may wrap up multiple lines into consideration, many corner cases need to be reconsidered. So basically, I have to rewrite the codes in the dialog panel, again, to accommodate this change.
Find the last visible option with the first visible option pre-determined |