Simple chroma effect

This commit is contained in:
tdixon 2017-10-12 02:32:30 -03:00
parent 695d2af03a
commit aacbdb359a
3 changed files with 8 additions and 0 deletions

View File

@ -78,6 +78,7 @@ void wallpaperBindingInit();
void nikoBindingInit(); void nikoBindingInit();
void oneshotBindingInit(); void oneshotBindingInit();
void steamBindingInit(); void steamBindingInit();
void chromaBindingInit();
RB_METHOD(mriPrint); RB_METHOD(mriPrint);
RB_METHOD(mriP); RB_METHOD(mriP);
@ -112,6 +113,7 @@ static void mriBindingInit()
nikoBindingInit(); nikoBindingInit();
oneshotBindingInit(); oneshotBindingInit();
steamBindingInit(); steamBindingInit();
chromaBindingInit();
if (rgssVer >= 3) if (rgssVer >= 3)
{ {

View File

@ -9,19 +9,23 @@ bool INIT_SUCCESS = false;
CChromaSDKImpl* chromaImpl = NULL; CChromaSDKImpl* chromaImpl = NULL;
void _attemptLinkSdk() { void _attemptLinkSdk() {
Debug() << "Attempting to bind Chroma SDK";
#if !defined(_WIN32) && !defined(_WIN64) #if !defined(_WIN32) && !defined(_WIN64)
// currently razr chroma is windows-only. // currently razr chroma is windows-only.
// so, if we are not building for windows platform // so, if we are not building for windows platform
// then don't bother with chroma stuff // then don't bother with chroma stuff
Debug() << "Chroma: Unsupported Platform";
return; return;
#endif #endif
chromaImpl = new CChromaSDKImpl(); chromaImpl = new CChromaSDKImpl();
Debug() << "Chroma Impl @" << chromaImpl;
chromaImpl->Initialize(); chromaImpl->Initialize();
INIT_SUCCESS = true; INIT_SUCCESS = true;
} }
RB_METHOD(chromaSetBase) { RB_METHOD(chromaSetBase) {
Debug() << "Chroma: Attempting to set base colour";
RB_UNUSED_PARAM; RB_UNUSED_PARAM;
if (INIT_SUCCESS) { if (INIT_SUCCESS) {
ChromaSDK::Keyboard::CUSTOM_EFFECT_TYPE effect = {}; ChromaSDK::Keyboard::CUSTOM_EFFECT_TYPE effect = {};
@ -34,6 +38,7 @@ RB_METHOD(chromaSetBase) {
ChromaSDK::Keyboard::CHROMA_CUSTOM, ChromaSDK::Keyboard::CHROMA_CUSTOM,
&effect, &effect,
NULL); NULL);
Debug() << "Chroma: Set base colour effect";
} }
return Qnil; return Qnil;
} }

View File

@ -16,6 +16,7 @@ begin
# Load persistent data # Load persistent data
Persistent.load Persistent.load
Chroma.setBase
# Prepare for transition # Prepare for transition
Graphics.freeze Graphics.freeze