Weekend and Plans

This last weekend I fought to some linker errors in MSVC 2010. It almost gave me a headache, as I was trying to solve the errors for hours without many results. The solution today was simply changing to MSVC 2008 where all works well until now. I still don’t understand what is the problem with 2010 version, I’ll try compiling last changes in other ides than that MSVC later.

Regarding the sdl backend code to subsystems separation I’ve started to do, I’ve Timer, Mutex, Audio and File ready and also Events, but if I commit it now it will break the system as I’ve modified the already existent events.cpp. Now I’m finishing with Graphics sdl subsystem.

Now, the main problem is solving how the subsystems will comunicate with each other. For example, the graphics subsystem needs to know where the cursor is, for showing it on screen. But the cursor coords are stored and modified in the events subsystem. So I need to create a way for both of them to share data.

My current ideas for solving this issue are:

  • Creating a new function in OSystem_SDL class that will send to each subsystem a msg. Then, each subsystem would interpret the msg if they need.
  • Adding the shared data/functions as public in the virtual subsystems, and then calling/reading them from the different subsystems.
  • Having the shared data/functions in OSystem_SDL.

I’m still thinking what the best option is, and if there are other better solutions to this.