Hello,
I have a LEDs lamp that can be turned on using a C library. I mean: I can send my lamp messages like "use this RGB color during this amount of time". It accepts effects like flickering or fade too.
So, I have this lamp in my desk, and I want to "connect" the game with it. For example:
- When the user turns on his lantern (or glowstick), my LEDs lamp turns on too, with the same color
- When the user enters a place that contains a light, my LEDs lamp turns on too. I can control the fade (if I move closer to the light in the game, I can send more intensity to my LEDs lamp)
I've successfully compiled the code. And I can link with my C library. Now, I just want to work with the light part of the engine. Looks like there are 2 main classes I should work with:
I guess I should modify the method FadeTo of iLight class, to send the proper RGB code and time to my lamp, using my own library's functions. So, any time a light is turned on in the game, is also turned on in my desk. Apart from that, am I missing something important, in order to achieve my goals?
I'm also adding a new menu entry to enable/disable my stuff, but this is a different story, involving MainMenu.cpp, mostly.
Any tip is appreciated. Many thanks in advance!