Finally, my exam time is over and I move back from my student apartment in Gdansk to my hometown for next two months. Moving cost a lot of time and effort, but from now I'll have peace and quiet to do serious work with Prince's code ;)
I'm also waiting for results of two last exams and I wish I will pass all of them.
Let's talk about my progress in last days:
At the beginning of a week I was working on handling rest of LMB actions outside of inventory. I manged to finish rest of option frame events (Examine, Pick up, Use, Open/Push, Close/Pull, Talk to). I have to implement pathfinding part before finishing the last one - "Walk to".
After choosing one of these options, it searches in proper mobs/op codes list to check if any special event for selected mob exists. If it exists we store its op code as next for foreground interpreter. If not we just store standard procedure's op code. Something similar happens for "Give item" and "Use item" events outside of inventory (events with item taken out from inventory). Second important step it to set current mob flag to allow proper working of upcoming script's functions.
Next thing that I had to understand this week, was how actually the script part is working. I choosed "Examine" option for testing, set up interpreter's debugger to show only foreground op codes and start fixing my first script functions.
I was able to implement script O_GETMOBTEXT(), which also need big update in setVoice() function. It used to support only one type of voice file for intro part, now it should work for every voice in game.
Last thing that I fixed to finish "Examine" option was small, but was very hard to find out. I had to update loading data for longer texts, when prince is talking more then once, like for graves examining in first location. I also implement O_CHANGEMOB() that is used to set visibility of mob and allow to change from one mob to another, e.g changing "unknown grave" to "Arivald's grave" after first examining.
I also updated checkMob() function and it's displaying names of background animation mobs and objects now. I also checked original code and found part of code that update visibility of static mobs for each location.
|Background animation - owl (left) / Object - shovel (right)|
Displaying names of mobs
I was also trying to find memory leak problems and I fixed most of them, but part of implemented code still need some clean-up and tweaks.
Right now I'm working on dialog part in script for "Talk to" option. It should allow to get some serious progress and to actually play a game for a while, but it's pretty complex and it requires implementing about 4-5 new script functions, so stay tuned.