将下载的包cheat.7z放在mame64.exe的同层目录中,再运行mamepgui.exe(M+GUI)启动游戏,加载的若是mame64.exe,按一下TAB键,顶层菜单中会看到“Cheat”的设置,点进去,同时可看到在“Cheat”菜单里还有“连发设置”也叫“连射设置”的功能。
注意这里是mame64.exe(mame32.exe/mame.exe)而非mamep.exe,关于两者的区别见:
人,技术,生活。
将下载的包cheat.7z放在mame64.exe的同层目录中,再运行mamepgui.exe(M+GUI)启动游戏,加载的若是mame64.exe,按一下TAB键,顶层菜单中会看到“Cheat”的设置,点进去,同时可看到在“Cheat”菜单里还有“连发设置”也叫“连射设置”的功能。
注意这里是mame64.exe(mame32.exe/mame.exe)而非mamep.exe,关于两者的区别见:
对于玩《雷电1》《雷电2》之类街机游戏苦于手指按不过来,子弹连射是多么渴望的功能。
而按键的“连射设置”选项的位置,在mamep.exe里和mame64.exe里有所不同。
当mamepgui.exe(M+GUI)启动游戏,加载的是mamep.exe后,按一下TAB键,顶层菜单中会看到“连射设置”。
当mamepgui.exe(M+GUI)启动游戏,加载的是mame64.exe后,按一下TAB键,顶层菜单中会看到“Cheat”选项,点进去会看到“Autofire Settings”选项,点进去就可设置连发了。
mamep.exe即Multiple Arcade Machine Emulator Plus!,它和mame64.exe是两码事,是两种不同的分枝。
“图像增强”这个选项只在mamep.exe里有,它包括:Scale3x、Super Eagle、HQ3X、3xBRZ之类的选择内容。
“图像增强”在mame64.exe里是没有的,也即运行mamepgui.exe(M+GUI),将“MAME可执行文件”选项设置为mame64.exe,导出完xml list后,在选项里的全局->核心视频->核心屏幕下,是看不到“图像增强”的条目的,只是“视觉效果”条目内容比将“MAME可执行文件”选项设置为mamep.exe时增多了。
好像mamep.exe不再更新了,我这下载的最后版本是0.168。
而我写本文时下载的mame64.exe最新版本为0.200。
mamepgui.exe最新版本为1.8.2。
原因是Gdiplus需要先初始化:
1 2 3 4 | ULONG_PTR gdiPlusToken_; GdiplusStartupInput gdiplusstartupinput; GdiplusStartup(&gdiPlusToken_, &gdiplusstartupinput, NULL); |
退出时,反初始化:
1 | GdiplusShutdown(gdiPlusToken_); |
怎么完美调用gSoap库呢?
首先与用的是stdsoap2.c还是stdsoap2.cpp有关。
我这里举例内编的是stdsoap2.cpp,那么一个WebService调用过程如下:
1 2 3 4 5 6 7 8 9 10 11 12 | void aWebServiceCall() { struct soap soapCtx; soap_call___ns1__XXX(&soapCtx, url.c_str(), ...); if (soapCtx.error) { printf("soap error: %d, %s, %s\n", soapCtx.error, *soap_faultcode(&soapCtx), *soap_faultstring(&soapCtx)); } soap_end(&soapCtx); } |
看到没,C++版的soap只需要在每次调完soap_call___ns1__XXX之类的接口后,调用一次soap_end就完事了,这是完美的写代码流程。但实际运行后还是有内存泄露,研究发现,这个内存泄露是由于OpenSSL的屁股没揩干净造成的。最终无leak的结尾函数如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | void doSSLLeftCleanup() { // thread-local cleanup ERR_remove_state(0); // thread-safe cleanup CONF_modules_unload(1); // global application exit cleanup (after all SSL activity is shutdown) ERR_free_strings(); EVP_cleanup(); CRYPTO_cleanup_all_ex_data(); int i, n; STACK_OF(SSL_COMP) *ssl_comp_methods; ssl_comp_methods = SSL_COMP_get_compression_methods(); n = sk_SSL_COMP_num(ssl_comp_methods); for (i = 0; i < n; i++) { (void)sk_SSL_COMP_delete(ssl_comp_methods, i); } sk_SSL_COMP_free(ssl_comp_methods); } |
但遗憾的是,对于openssl-1.0.1p,SSL_COMP_get_compression_methods返回的是一个内部静态变量,没有导出函数可以将其置为NULL,也即doSSLLeftCleanup不能调第二次,所以,请在所有的最后的最后调一次。但这也从另一方面说明,这种内存泄露是不会累加的,不管gSoap接口函数调用多少次。
注:这里的gSoap版本为:2.8.37
编译gSoap生成的源码报找不到wsa__FaultSubcodeValues定义的错误。
解决方法:
在wsdl2h生成的.h文件中加入
1 | #import "wsa.h" |
再用soapcpp2生成源码。
using gsoap 2.8.37:
./wsdl2h -c -s serviceplus.xml serviceplus.xsd
in serviceplus.xml.h, add
1 2 | #import "wsse.h" #import "saml1.h" |
./soapcpp2 -c serviceplus.xml.h -I /home/work/gsoap/gsoap-2.8.37/gsoap/import -I /home/work/gsoap/gsoap-2.8.37/gsoap
路径放在A列,B列将输出图片。按ALT+F11打开宏IDE,输入如下语句并执行。
1 2 3 4 | .separator "\t" .output a.txt SELECT name,?id FROM student; .output stdout |
这样就可把生成的a.txt导入到excel里了。
注意,sqlite导出的文本是unix格式,直接记事本打开看不到换行。
1 2 3 4 5 6 7 | #include <opencv2/opencv.hpp> using namespace cv; Mat imgBig = imread("d:/big.jpg"); Mat imgSmall = imgBig(cv::Rect(x, y, w, h)); imwrite("d:/small.jpg", imgSmall); |