作者o035016 (AIR劇本檔提供中 請Q我)
看板ck57th308
標題承上一篇
時間Fri Oct 19 18:19:42 2007
爲了以防萬一如果有人太好心想要幫我打包,附上源碼
#include <windows.h>
#include <iostream>
#include <iomanip>
#include <fstream>
using namespace std;
int getVirtualScanCode()
{
static HANDLE hIn = GetStdHandle(STD_INPUT_HANDLE);
INPUT_RECORD ir;
DWORD n;
FlushConsoleInputBuffer(hIn);
ReadConsoleInput(hIn, &ir, 1, &n);
while( ir.EventType != KEY_EVENT || !ir.Event.KeyEvent.bKeyDown )
ReadConsoleInput(hIn, &ir, 1, &n);
FlushConsoleInputBuffer(hIn);
WORD vs = ir.Event.KeyEvent.wVirtualScanCode;
WORD ck = ir.Event.KeyEvent.dwControlKeyState;
if (0x45 == vs)
{
return vs;
}
return vs + (ck & 0x100) / 2;
}
int main()
{
cout << "Version: 1.3" << endl;
cout << "For MbacPC 1.3 Only." << endl;
cout << "Written by whmface at bbs.sumisora.com" << endl;
const int START = 0x93a34;
bool Continue = TRUE;
int ScanCode;
int LastScanCode = 5000;
int Index = 0;
bool Good = true;
char FileName[200] = "mbacPC.exe";
fstream Bin;
Bin.open(FileName, ios::in);
if (0 == Bin)
{
cout << "Can't find mbacPC.exe." << endl;
cout << "Please put this file in the same dir as mbacPC.exe." << endl;
system("pause");
return 1;
}
else
Bin.close();
Bin.open(FileName);
Bin.seekp(START);
char Str[20][10] =
{
"1P_Down",
"1P_Up",
"1P_Left",
"1P_Right",
"1P_A",
"1P_B",
"1P_C",
"1P_D",
"1P_Bind1",
"1P_Bind2",
"2P_Down",
"2P_Up",
"2P_Left",
"2P_Right",
"2P_A",
"2P_B",
"2P_C",
"2P_D",
"2P_Bind1",
"2P_Bind2",
};
while (Continue)
{
if (true == Good)
{
cout << setw(8) << Str[Index] << ':';
}
ScanCode = getVirtualScanCode();
if (LastScanCode == ScanCode || 0 == ScanCode)
{
Good = false;
continue;
}
Good = true;
++Index;
cout << hex << ScanCode << endl;
Bin.put(ScanCode);
if (20 == Index)
{
break;
}
LastScanCode = ScanCode;
}
system("pause");
return 0;
}
知道這是什麼用途的,送簽名一份,想要P幣也可
--
使用者名稱 檔案 速度 已傳輸 已等待 上載時間 狀態
正人君子 [夜勤病棟][Night.. 586位.. 624.34k 53.36分 9:24分 傳輸中
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.64.139.149
1F:推 oahney:EZ 10/20 09:07
3F:推 hyh1987:右下角有個Free按進去後 會要你選擇下載伺服器 10/20 09:08
4F:推 hyh1987:輸入驗證碼就可以下載了 載載 10/20 09:09
5F:推 o035016:ㄎㄎ 我有優文一篇ㄌㄝ ㄆㄆ 10/20 12:19
6F:→ o035016:你竟然還想教宅宅怎麼載RS的檔案,魯班門前弄大斧,君翰面 10/20 12:20
7F:→ o035016:前耍攬啪啊 10/20 12:22
8F:→ o035016:幹 忘了 剛溫啦!!給你拜<(_ _)> 10/20 12:22
9F:→ o035016: <(_ _)> 10/20 12:24
10F:→ o035016: <(_ _)> 10/20 12:24
11F:推 oahney:君憨P幣轉帳到hyh1987 謝謝 10/20 20:52
12F:推 o035016:早就轉啦 沒收到嗎? 10/21 12:12
13F:推 hyh1987:恩 有了 哈 謝謝:) 10/21 13:04
14F:推 o035016:話說這支小東西運行起來看似很正常,但是沒效果 囧 10/21 16:26
15F:→ o035016:跑去專板問人... 10/21 16:27