本文整理汇总了C++中Console::debugPrintf方法的典型用法代码示例。如果您正苦于以下问题:C++ Console::debugPrintf方法的具体用法?C++ Console::debugPrintf怎么用?C++ Console::debugPrintf使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Console
的用法示例。
在下文中一共展示了Console::debugPrintf方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: kGetEvent
//.........这里部分代码省略.........
// At least one fan-made game (Betrayed Alliance) requires 0x02 to be in the upper byte,
// otherwise the darts game (script 111) will not work properly.
// It seems Sierra fixed this behaviour (effectively bug) in the SCI1 keyboard driver.
// SCI32 also resets the upper byte.
if (getSciVersion() <= SCI_VERSION_01) {
modifiers |= 0x0200;
}
}
//s->_gui->moveCursor(s->gfx_state->pointer_pos.x, s->gfx_state->pointer_pos.y);
switch (curEvent.type) {
case SCI_EVENT_QUIT:
s->abortScriptProcessing = kAbortQuitGame; // Terminate VM
g_sci->_debugState.seeking = kDebugSeekNothing;
g_sci->_debugState.runningStep = 0;
break;
case SCI_EVENT_KEYBOARD:
writeSelectorValue(segMan, obj, SELECTOR(type), SCI_EVENT_KEYBOARD); // Keyboard event
s->r_acc = make_reg(0, 1);
writeSelectorValue(segMan, obj, SELECTOR(message), curEvent.character);
// We only care about the translated character
writeSelectorValue(segMan, obj, SELECTOR(modifiers), modifiers);
break;
case SCI_EVENT_MOUSE_RELEASE:
case SCI_EVENT_MOUSE_PRESS:
// track left buttton clicks, if requested
if (curEvent.type == SCI_EVENT_MOUSE_PRESS && curEvent.data == 1 && g_debug_track_mouse_clicks) {
g_sci->getSciDebugger()->debugPrintf("Mouse clicked at %d, %d\n",
mousePos.x, mousePos.y);
}
if (mask & curEvent.type) {
int extra_bits = 0;
switch (curEvent.data) {
case 2:
extra_bits = SCI_KEYMOD_LSHIFT | SCI_KEYMOD_RSHIFT;
break;
case 3:
extra_bits = SCI_KEYMOD_CTRL;
default:
break;
}
modifiers |= extra_bits; // add these additional bits to the mix
writeSelectorValue(segMan, obj, SELECTOR(type), curEvent.type);
writeSelectorValue(segMan, obj, SELECTOR(message), 0);
writeSelectorValue(segMan, obj, SELECTOR(modifiers), modifiers);
s->r_acc = make_reg(0, 1);
}
break;
default:
// Return a null event
writeSelectorValue(segMan, obj, SELECTOR(type), SCI_EVENT_NONE);
writeSelectorValue(segMan, obj, SELECTOR(message), 0);
writeSelectorValue(segMan, obj, SELECTOR(modifiers), modifiers);
s->r_acc = NULL_REG;
}