コード例 #1
0
ファイル: resettm.cpp プロジェクト: innovatelogic/ilogic-vm
XFormActionTable::XFormActionTable(): 
	ActionTable(s_actionTableID, s_actionContextID, TSTR(GetString(IDS_TOOLS_CATEGORY)))
{
	BuildActionTable(NULL, sizeof(s_actionDescriptions) / sizeof(s_actionDescriptions[0]), s_actionDescriptions, hInstance);

	IActionManager* actionMgr = GetCOREInterface()->GetActionManager();
	if (actionMgr) {
		actionMgr->RegisterActionTable(this);
		actionMgr->ActivateActionTable(this, s_actionTableID);
	}
}
コード例 #2
0
ファイル: main.cpp プロジェクト: Anadorr/LedControl
int main(int argc, char * argv[]) {
    // debug test cases
    // DEBUG
    /*
    uint tmpSize;
    RGB* result;
    GetActionOutput(STROBE_UNEVEN, &tmpSize, &result, COLOR_BLACK, COLOR_RED, 1000, 1000, 0, 10, 1, 0.3f, 0.1f);
    for (int i=0; i< tmpSize; i++) {
        RGB color = result[i];
        cout << (int)color.r << "/" << (int)color.g << "/" << (int)color.b << endl;
    }*/
    // END DEBUG

    for (int i=0; i < argc; i++) {
        cout << argv[i] << endl;
    }

    uint actionCount = 0;
    long endTime = 0;
    lazyActionInitializer ** actionTable = BuildActionTable(actionCount, endTime);

    long currentTime = 0;
    ActionWalker walker = ActionWalker(actionTable, actionCount);

    while (currentTime < endTime) {
        RGB color = walker.GetCurrentColor(currentTime);
        cout << (int)color.r << "/" << (int)color.g << "/" << (int)color.b << endl;
        if (currentTime % 100 == 0) {
            cout << "Time: " << currentTime << endl;
        }
        currentTime += 10;
    }
    walker.DestroyTable();
    walker.~ActionWalker();

    return 0;

}