ConvertHandler() { #define ADD_OPTION(name) mNames.push_back("-" name); mOptions.insert(name) #define ADD_ALIAS(alias,original) ADD_OPTION(alias); mAliases.insert(pair<string,string>(alias,original)) // Long names mNames.push_back("--convert"); mNames.push_back("--input"); mNames.push_back("--output"); // Short names mNames.push_back("-c"); mNames.push_back("-i"); mNames.push_back("-o"); // Options ADD_OPTION("flips"); //flip s coordinate ADD_OPTION("flipt"); //flip t coordinate ADD_OPTION("flipr"); //flip r coordinate ADD_OPTION("flipx"); //flip x coordinate ADD_OPTION("flipy"); //flip y coordinate ADD_OPTION("flipz"); //flip z coordinate ADD_OPTION("flip"); //? ADD_OPTION("flop"); //? ADD_OPTION("flipn"); //flip normals ADD_OPTION("dims"); //show dimensions ADD_OPTION("basepath"); //specify model base path for building material scripts ADD_OPTION("autolod"); //create automatic lods (TODO: may specify distance list) ADD_OPTION("autoedge"); //create edge list (prepare for stencil shadows) ADD_OPTION("autotangent"); //create tangent texcoord unit ADD_OPTION("forceflatshade"); //force flat shading ADD_OPTION("no-optimize"); //forcefully disable mesh optimization ADD_ALIAS ("x","addx"); //translate x (alias) ADD_ALIAS ("y","addy"); //translate y (alias) ADD_ALIAS ("z","addz"); //translate z (alias) ADD_OPTION("addx"); //translate x ADD_OPTION("addy"); //translate y ADD_OPTION("addz"); //translate z ADD_OPTION("adds"); //translate s ADD_OPTION("addt"); //translate t ADD_OPTION("addr"); //translate r ADD_OPTION("mpyx"); //multiply x ADD_OPTION("mpyy"); //multiply y ADD_OPTION("mpyz"); //multiply z ADD_OPTION("mpys"); //multiply s ADD_OPTION("mpyt"); //multiply t ADD_OPTION("mpyr"); //multiply r ADD_OPTION("inputPath"); //override input path ADD_OPTION("outputPath"); //override output path ADD_OPTION("rootPath"); //override executable path #undef ADD_OPTION }
void coopTimerStart(int timer, ClockDivider divider, u16 ticks, VoidFn callback) { timer &= 3; TIMER_DATA(timer) = ticks; if (callback) { coopIrqSet(IRQ_TIMER(timer), callback); irqEnable(IRQ_TIMER(timer)); TIMER_CR(timer) = TIMER_IRQ_REQ | divider | TIMER_ENABLE; }else TIMER_CR(timer) = divider | TIMER_ENABLE; } static const fxe2_export_t arm7_funcs[] = { ADD_ALIAS(swiWaitForVBlank, coopWaitForVBlank), ADD_FUNC_(irqSet), ADD_FUNC_(irqClear), ADD_FUNC_(irqEnable), ADD_FUNC_(irqDisable), ADD_FUNC_(writePowerManagement), ADD_FUNC_(timerStart), ADD_FUNC_(timerPause), ADD_FUNC_(timerStop), ADD_FUNC_(timerElapsed), ADD_FUNC_(micSetAmp), ADD_FUNC_(micReadData8), ADD_FUNC_(micReadData12), ADD_FUNC_(fifoSendAddress), ADD_FUNC_(fifoSendValue32), ADD_FUNC_(fifoSendDatamsg),
* ADD_METHOD(name) expands to a correct PyMethodDef declaration * { 'name', (PyCFunction)ssl_Connection_name, METH_VARARGS } * for convenience * ADD_ALIAS(name,real) creates an "alias" of the ssl_Connection_real * function with the name 'name' */ #define ADD_METHOD(name) \ { #name, (PyCFunction)ssl_Connection_##name, METH_VARARGS, ssl_Connection_##name##_doc } #define ADD_ALIAS(name,real) \ { #name, (PyCFunction)ssl_Connection_##real, METH_VARARGS, ssl_Connection_##real##_doc } static PyMethodDef ssl_Connection_methods[] = { ADD_METHOD(get_context), ADD_METHOD(pending), ADD_METHOD(send), ADD_ALIAS (write, send), ADD_METHOD(sendall), ADD_METHOD(recv), ADD_ALIAS (read, recv), ADD_METHOD(bio_read), ADD_METHOD(bio_write), ADD_METHOD(renegotiate), ADD_METHOD(do_handshake), #if defined(OPENSSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x00907000L ADD_METHOD(renegotiate_pending), #endif ADD_METHOD(total_renegotiations), ADD_METHOD(connect), ADD_METHOD(connect_ex), ADD_METHOD(accept), ADD_METHOD(bio_shutdown),