- UID
- 2546
- 积分
- 159
- 帖子
- 30
- 主题
- 5
- 论坛币
- 863
- 威望
- 0
- EP值
- 133
- MP值
- 0
- 阅读权限
- 50
- 注册时间
- 2015-5-9
- 在线时间
- 52 小时
- 最后登录
- 2024-2-1
|
本帖最后由 Seekladoom 于 2022-1-29 01:14 编辑
def tcaxPy_Main(_i, _j, _n, _start, _end, _elapk, _k, _x, _y, _a, _txt):
对应的源码在tcax.c这个源码文件中:
- pReturnedBuf = tcaxpy_script_func_main(pTcaxPy, iLine, iText, nTexts, start, end, timeDiff, time, x, y, advance, text);
- if (!pReturnedBuf) {
- fclose(assfp);
- libtcas_write_header(&tcasFile, &tcasHeader, 0);
- libtcas_close_file(&tcasFile);
- printf("Fatal Error: failed to execute the tcaxPy_Main() function in the %i(th) user tcax py script.\n", i + 1);
- return -1;
- }
- if ((int)pReturnedBuf[0] > 0) {
- tcax_write_ass_string_to_file(assfp, (const wchar_t *)pReturnedBuf[1], (int)pReturnedBuf[0]);
- free(pReturnedBuf[1]);
- }
- if ((int)pReturnedBuf[2] > 0) {
- tcax_write_tcas_buffer_to_file(&tcasFile, &tcasHeader, (const tcas_unit *)pReturnedBuf[3], (int)pReturnedBuf[2]);
- free(pReturnedBuf[3]);
- }
- free(pReturnedBuf);
- SetConsoleCursorPosition(hStdout, coord);
- printf("Executing script %i of %i, progress: %.2f%%\n", i + 1, pAttributes->py_file_count, 100 * (index - offset) / (double)total);
- //printf("Progress: %.2f%c\n", 100 * (i + (index - offset) / (double)total) / pAttributes->py_file_count, '%');
- }
- index ++;
复制代码
单行重点标注:
- pReturnedBuf = tcaxpy_script_func_main(pTcaxPy, iLine, iText, nTexts, start, end, timeDiff, time, x, y, advance, text);
复制代码
追加补充:
TCAX源码的tcaxPy文件夹中的py.c文件的第437行也能找到def tcaxPy_Main相关信息,在py.c搜main即可
|
|