void BotIdentifyItems() { while(1) { SetCursorPosition(10,13); Sleep(400); CaptureScreen(&globalscreengrab); if(FindIdentifyColor(&globalscreengrab) == 0) { break; } else { SetCursorPosition(rx,ry); Sleep(500); CaptureScreen(&globalscreengrab); mouse_event(MOUSEEVENTF_RIGHTDOWN,0,0,0,0); // нажали левую кнопку мыши mouse_event(MOUSEEVENTF_RIGHTUP,0,0,0,0); // отпустили левую кнопку мыши ( НЕ ЗАБЫВАТЬ ) if(FindLegendaryItems(&globalscreengrab) == 1) { Sleep(7000); Item_x.push_back(rx); Item_y.push_back(ry); logprint("Легендарный предмет распознан и занесен в массив", 0); } else { Sleep(3000); CaptureScreen(&globalscreengrab); if(FindUsefulItems(&globalscreengrab) == 0) { //если вещь бесполезная тупо оставляем в инвентаре - выкинет на поле битвы logprint("Вещь бесполезна", 0); } else { Item_x.push_back(rx); Item_y.push_back(ry); logprint("Вещь полезна, занесена в массив", 0); } } } } }
void BotFollowFlag() { srand ( time(NULL) ); int followflagtype = rand() % 4 + 1; if(StartLevel == 0) { if(followflagtype == 1) { SetCursorPosition(rx + 20,ry + 20); } else if(followflagtype == 2) { SetCursorPosition(rx - 20,ry + 20); } else if(followflagtype == 3) { SetCursorPosition(rx - 20,ry - 20); } else if(followflagtype == 4) { SetCursorPosition(rx + 20,ry - 20); } } else { if(followflagtype == 1) { SetCursorPosition(367,228); } else if(followflagtype == 2) { SetCursorPosition(649,253); } else if(followflagtype == 3) { SetCursorPosition(346,450); } else if(followflagtype == 4) { SetCursorPosition(674,451); } } BotSleep(0,0,0,0,0,0,0,0,0,0,0,0,800); CaptureScreen(&globalscreengrab); if(BotGetFlagStatus(&globalscreengrab) == 1) { StartLevel = 0; mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0); // нажали левую кнопку мыши mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0); // отпустили левую кнопку мыши ( Ќ≈ «јЅџ¬ј“№ ) BotSleep(1,0,0,0,0,0,0,0,0,0,0,0,1000); } }
void CaptureScreen(char wnd_name[]){ HWND hwnd; hwnd = FindWindowA(NULL,wnd_name); //RECT wR,cR; //GetWindowRect(hwnd, &wR); //GetClientRect(hwnd, &cR); //printf("WINDOW RECT:{%04d, %04d, %04d, %04d};\nCLIENT RECT:{%04d, %04d, %04d, %04d};\n", wR.left,wR.top,wR.right, wR.bottom, cR.left,cR.top,cR.right, cR.bottom); CaptureScreen(hwnd); }
void Scope::ResizeSource() { m_intSrcWidth = int(m_RiftDisplayInfo.dmPelsWidth / 2.0 / m_fltZoom); m_intSrcHeight = int(m_RiftDisplayInfo.dmPelsHeight / m_fltZoom); DeleteObject(m_winCopyBM); m_winCopyBM = CreateCompatibleBitmap(m_winDC, m_intMainDisplayWidth, m_intMainDisplayHeight); SelectObject(m_winCopyDC, m_winCopyBM); // After deleting the old bitmap, call CaptureScreen explicitly. // Otherwise, DrawScope() may be called while the copy of the // screen is all black which causes flicker. CaptureScreen(); }
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ){ read_xml(CONFIG_FILE_NAME, gConfig); ChangeWindowMode(gConfig.get("WindowMode",true)); SetMainWindowText( PJTITLE ); if( DxLib_Init() == -1 ){ return -1; // エラーが起きたら直ちに終了 } LPCSTR font_path = "img\\font.ttf"; // 読み込むフォントファイルのパス AddFontResourceEx(font_path, FR_PRIVATE, NULL); ChangeFont("Neuropol",DX_CHARSET_DEFAULT); ChangeFontType( DX_FONTTYPE_ANTIALIASING_EDGE ); shotButton = gConfig.get("Pad.Shot",PAD_INPUT_1); subButton = gConfig.get("Pad.Sub",PAD_INPUT_2); SetJoypadInputToKeyInput(DX_INPUT_PAD1, shotButton, gConfig.get("Key.Shot", KEY_INPUT_Z), -1, -1, -1 ) ; SetJoypadInputToKeyInput(DX_INPUT_PAD1, subButton, gConfig.get("Key.Sub", KEY_INPUT_X), -1, -1, -1 ) ; gGameManager.Set(&GameManager::Init); for(;;){ //メインループ //SetDrawScreen(DX_SCREEN_BACK); SetDrawScreen(gDrawScr); ClearDrawScreen(); if(ProcessMessage()==-1 || GameMain()==1){break;} //ゲーム本体を実行 SetDrawScreen( DX_SCREEN_BACK ) ; //裏スクリーンに描画対象を移す SetDrawBlendMode(DX_BLENDMODE_ALPHA,255); DrawGraph(0,0,gDrawScr,FALSE); //実際に描画 SetDrawBlendMode(DX_BLENDMODE_NOBLEND,0); //FPS描画 { int NowFPS = gFPS.Get(); int Col = (int)(255 * NowFPS / gFPS.GetDefaultFPS()); DrawFormatString(SCR_WIDTH-80,SCR_HEIGHT-20,GetColor(255,Col,Col),"%02dFPS",NowFPS); } ScreenFlip(); CaptureScreen(); gFPS.Fix(); } DxLib_End() ; // DXライブラリ使用の終了処理 write_xml(CONFIG_FILE_NAME,gConfig); return 0 ; // ソフトの終了 }
FIBITMAP* CaptureMonitor (TCHAR* szDevice) { SIZE size; HDC hScrDC; FIBITMAP *dib = NULL; // get screen resolution if(!szDevice) { hScrDC = GetDC(NULL); /*Get full virtualscreen*/ size.cx = GetSystemMetrics(SM_CXVIRTUALSCREEN); size.cy = GetSystemMetrics(SM_CYVIRTUALSCREEN); } else { hScrDC = CreateDC(szDevice, NULL, NULL, NULL); size.cx = GetDeviceCaps(hScrDC, HORZRES); size.cy = GetDeviceCaps(hScrDC, VERTRES); } dib = CaptureScreen (hScrDC, size); ReleaseDC(NULL, hScrDC); return dib; }
//--------------------------------------------------------------------------- // capture window as FIBITMAP - caller must FIP->FI_Unload(dib) FIBITMAP* CaptureWindow (HWND hCapture, BOOL bClientArea, BOOL bIndirectCapture) { FIBITMAP *dib; HWND hForegroundWin; HDC hScrDC; // screen DC RECT rect; // screen RECT SIZE size; // DIB width and height = window resolution if (!hCapture || !IsWindow(hCapture)) return 0; hForegroundWin = GetForegroundWindow(); //Saving foreground window SetForegroundWindow(hCapture); // Make sure the target window is the foreground one BringWindowToTop(hCapture); // bring it to top as well /// redraw window to prevent runtime artifacts in picture UpdateWindow(hCapture); if(bIndirectCapture){ intptr_t wastopmost=GetWindowLongPtr(hCapture,GWL_EXSTYLE)&WS_EX_TOPMOST; if(!wastopmost) SetWindowPos(hCapture,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE); hScrDC = GetDC(NULL); /*Get full virtualscreen*/ size.cx = GetSystemMetrics(SM_CXVIRTUALSCREEN); size.cy = GetSystemMetrics(SM_CYVIRTUALSCREEN); dib = CaptureScreen(hScrDC,size); ReleaseDC(hCapture,hScrDC); if(bClientArea){ GetClientRect(hCapture,&rect); ClientToScreen(hCapture,(POINT*)&rect); rect.right+=rect.left; rect.bottom+=rect.top; }else GetWindowRect(hCapture,&rect); if(rect.left<0) rect.left=0; if(rect.top<0) rect.top=0; if(rect.right>(long)FIP->FI_GetWidth(dib)) rect.right=FIP->FI_GetWidth(dib); if(rect.bottom>(long)FIP->FI_GetHeight(dib)) rect.bottom=FIP->FI_GetHeight(dib); /// crop the window to ClientArea FIBITMAP* dibClient = FIP->FI_Copy(dib,rect.left,rect.top,rect.right,rect.bottom); FIP->FI_Unload(dib); dib = dibClient; if(!wastopmost) SetWindowPos(hCapture,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE); }else{ GetWindowRect(hCapture,&rect); if(GetAncestor(hCapture,GA_PARENT)) hScrDC=GetDC(hCapture);//hCapture is part of a window, capture that else hScrDC=GetWindowDC(hCapture);//entire window w/ title bar size.cx=ABS(rect.right-rect.left); size.cy=ABS(rect.bottom-rect.top); /// capture window and get FIBITMAP dib = CaptureScreen(hScrDC,size,hCapture); ReleaseDC(hCapture,hScrDC); if(bClientArea){//we could capture directly, but doing so breaks GetWindowRgn() and also includes artifacts... RECT rectCA; GetClientRect(hCapture,&rectCA); ClientToScreen(hCapture,(POINT*)&rectCA); rectCA.left-=rect.left; rectCA.top-=rect.top; rectCA.right+=rectCA.left; rectCA.bottom+=rectCA.top; /// crop the window to ClientArea FIBITMAP* dibClient = FIP->FI_Copy(dib,rectCA.left,rectCA.top,rectCA.right,rectCA.bottom); FIP->FI_Unload(dib); dib = dibClient; } } if(hForegroundWin){//restore previous foreground window SetForegroundWindow(hForegroundWin); BringWindowToTop(hForegroundWin); } return dib; }
void BotGoToBase() { if(teleportstepcount > 10) { logprint("Ќова¤ игра (ѕричина - превышение 10 неудачных телепортаций на базу)", 0); BotNewGame(); } else { //Ќе нашли ни союзника, ни цели, ни флаг и не стартанул эвент - значит потер¤лись и надо портатьс¤ на базу. if(dropitems == 1) { logprint("¬ыкидывание вещей перед телепортацией", 0); BotDropItems(); dropitems = 0; FullSlot = 0; } keybd_event('T', 0,0,0); keybd_event('T', 0,KEYEVENTF_KEYUP,0); while(1) { CaptureScreen(&globalscreengrab); int BotStatus = BotGetStatus(&globalscreengrab); location = BotGetLocation(); teleportsleepcount++; Sleep(100); if(BotStatus != 0) { teleportsleepcount = 0; teleportstepcount = 0; noputitemteleport = 0; BotHeal(); break; } else if((Event == 0) && (LoadLocation == 1) && (teleportsleepcount < 30) && (location == 0) && (((FindAttackColor(&globalscreengrab) == 1) || ((FindFollowColor(&globalscreengrab) == 1) && (solo == 0))) || ((FullSlot == 0) && (noputitemteleport == 0) && (FindItemColor(&globalscreengrab) == 1)) )) { teleportsleepcount = 0; teleportstepcount = 0; noputitemteleport = 0; BotHeal(); break; } else if((teleportsleepcount >= 30) && (teleportsleepcount < 70)) { //момент телепортации if((location == 1) && (LoadLocation == 1)) { teleportsleepcount = 70; } } else if(teleportsleepcount >= 70) { if((location == 1) && (LoadLocation == 1)) { teleportstepcount = 0; noputitemteleport = 0; if(key_showitems == 0) { keybd_event(VK_MENU, 0,0,0); keybd_event(VK_MENU, 0,KEYEVENTF_KEYUP,0); } else if(key_showitems == 1) { keybd_event('P', 0,0,0); keybd_event('P', 0,KEYEVENTF_KEYUP,0); } if(DetectAct4() == 1) { act4 = 1; } else { act4 = 0; } BotStashItems(); BotSleep(0,0,0,0,0,0,0,0,0,0,0,0,1000); NoEventCount = 200; if(key_showitems == 0) { keybd_event(VK_MENU, 0,0,0); keybd_event(VK_MENU, 0,KEYEVENTF_KEYUP,0); } else if(key_showitems == 1) { keybd_event('P', 0,0,0); keybd_event('P', 0,KEYEVENTF_KEYUP,0); } startteleport = 1; teleportsleepcount = 0; TraversedLocations++; break; } else { teleportstepcount++; teleportsleepcount = 0; break; } } } } }
int Init() { #pragma region Initialize parameters HWND hWnd; BITMAPCAPTURE bmpCapture; DWORD init; int i, j, sw=0, counter=0, prev=0, current=0, sum=0; HDC desktop; // attempt to find window hWnd = FindWindow(0, "World of Warcraft"); desktop = GetDC(hWnd); // if an error has occured if (hWnd == 0) { // exit the application return WF_NOHWND; } #pragma endregion #pragma region Step 1 - Initialize fishing // press '1' (FISHING) PostMessage(hWnd, WM_KEYDOWN, 0x31, 0); init = GetTickCount(); // unpress '1' PostMessage(hWnd, WM_KEYUP, 0x31, 0); #pragma endregion #pragma region Step 2 - Locate the fishing trap for (i=0;i<324 && sw != 1;i+=11) for (j=WF_VerticalMinimum;j<WF_VerticalMinimum + 64;j+=11) { SetCursorPos(i, j); Sleep(33); if (CheckForHookCursor(desktop) == TRUE) { sw = 1; break; } } if (sw != 1) return WF_NOHOOK; i -= 11; #pragma endregion #pragma region Step 3 - Make a cycle around the fishing trap coordinates and check for new animations counter = 0; CaptureScreen(hWnd, &bmpCapture); while (GetTickCount() - init < WF_WaitForSplash_ms) { int tmp; Sleep(70); tmp = CheckForSplash(&bmpCapture, i - WF_iDec - WF_FishHookMatrix/2, j - WF_jDec - WF_FishHookMatrix/2); #ifdef DEBUG printf("%d: %d ", GetTickCount() - init, prev); #endif current = prev - tmp; prev = tmp; if (current < 0) current *= -1; #ifdef DEBUG printf("= %d ", current); #endif if (counter > WF_CounterStart) { sum += current; #ifdef DEBUG printf("(avg thus far %d)", sum/counter); #endif if (counter > WF_CheckSumStart && current > (sum/counter)*WF_RedChannelMultiplication) { #ifdef DEBUG putchar('\n'); #endif break; } } #ifdef DEBUG putchar('\n'); #endif counter++; UpdateCapture(hWnd, &bmpCapture); } DeleteObject(bmpCapture.hbm); #pragma endregion #pragma region Step 4 - Animation event, grab the fish! SetCursorPos(i, j); mouse_event(MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0); mouse_event(MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0); mouse_event(MOUSEEVENTF_RIGHTDOWN, 0, 0, 0, 0); mouse_event(MOUSEEVENTF_RIGHTUP, 0, 0, 0, 0); #pragma endregion return WF_SUCCESS; }
void Transitions2D::CaptureEndScreen() { IwGxFlush(); mEndTexture = CaptureScreen(); }
void Transitions2D::CaptureStartScreen() { IwGxFlush(); mStartTexture = CaptureScreen(); }
int TAP_Main (void) { AddTime(0, 0); BMP_WriteHeader(NULL, 0, 0); BootReason(); BuildWindowBorder(); BuildWindowInfo(); BuildWindowLine(); BuildWindowLineSelected(); BuildWindowScrollBar(); BuildWindowTitle(); busyWait(); CalcAbsSectorFromFAT(NULL, 0); CalcPrepare(); CalcTopIndex(0, 0); Callback(0, NULL, 0, 0, 0, 0); CallbackHelper(NULL, NULL, 0, 0, 0, 0); CallBIOS(0, 0, 0, 0, 0); CallFirmware(0, 0, 0, 0, 0); CallTraceEnable(FALSE); CallTraceEnter(NULL); CallTraceExit(NULL); CallTraceInit(); CaptureScreen(0, 0, 0, NULL, 0, 0); ChangeDirRoot(); CheckSelectable(0, 0); combineVfdData(NULL, NULL); compact(NULL, 0); CompressBlock(NULL, 0, NULL); CompressedTFDSize(NULL, 0, NULL); CompressTFD(NULL, 0, NULL, 0, 0, NULL); CRC16(0, NULL, 0); CRC32 (0, NULL, 0); Delay(0); DialogEvent(NULL, NULL, NULL); DialogMsgBoxButtonAdd(NULL, FALSE); DialogMsgBoxExit(); DialogMsgBoxInit(NULL, NULL, NULL, NULL); DialogMsgBoxShow(); DialogMsgBoxShowInfo(0); DialogMsgBoxShowOK(); DialogMsgBoxShowOKCancel(0); DialogMsgBoxShowYesNo(0); DialogMsgBoxShowYesNoCancel(0); DialogMsgBoxTitleSet(NULL, NULL); DialogProfileChange(NULL); DialogProfileCheck(NULL, NULL, FALSE); DialogProfileLoad(NULL); DialogProfileLoadDefault(); DialogProfileLoadMy(NULL, FALSE); DialogProfileSave(NULL); DialogProfileSaveDefault(); DialogProfileScrollBehaviourChange(FALSE, FALSE); DialogProgressBarExit(); DialogProgressBarInit(NULL, NULL, 0, 0, NULL, 0, 0); DialogProgressBarSet(0, 0); DialogProgressBarShow(); DialogProgressBarTitleSet(NULL); DialogWindowChange(NULL, FALSE); DialogWindowCursorChange(FALSE); DialogWindowCursorSet(0); DialogWindowExit(); DialogWindowHide(); DialogWindowInfoAddIcon(0, 0, NULL); DialogWindowInfoAddS(0, 0, 0, NULL, 0, 0, 0, 0, 0); DialogWindowInfoDeleteAll(); DialogWindowInit(NULL, NULL, 0, 0, 0, 0, NULL, NULL, NULL, 0, 0, 0); DialogWindowItemAdd(NULL, 0, NULL, 0, FALSE, FALSE, 0, NULL); DialogWindowItemAddSeparator(); DialogWindowItemChangeFlags(0, FALSE, FALSE); DialogWindowItemChangeIcon(0, 0, NULL); DialogWindowItemChangeParameter(0, NULL, 0); DialogWindowItemChangeValue(0, NULL, 0); DialogWindowItemDelete(0); DialogWindowItemDeleteAll(); DialogWindowRefresh(); DialogWindowReInit(0, 0, 0, 0, 0, 0); DialogWindowScrollDown(); DialogWindowScrollDownPage(); DialogWindowScrollUp(); DialogWindowScrollUpPage(); DialogWindowShow(); DialogWindowTabulatorSet(0, 0); DialogWindowTitleChange(NULL, NULL, NULL); DialogWindowTypeChange(0); DrawMsgBoxButtons(); DrawMsgBoxTitle(); DrawOSDLine(0, 0, 0, 0, 0, 0); DrawProgressBarBar(0, 0); DrawProgressBarTitle(); DrawWindowBorder(); DrawWindowInfo(); DrawWindowLine(0); DrawWindowLines(); DrawWindowScrollBar(); DrawWindowTitle(); EndMessageWin(); exitHook(); ExtractLine(NULL, NULL); FileSelector(NULL, NULL, NULL, 0); FileSelectorKey(0, 0); FindDBTrack(); FindInstructionSequence(NULL, NULL, 0, 0, 0, 0); findSendToVfdDisplay(0, 0); FlashAddFavourite(NULL, 0, FALSE); FlashDeleteFavourites(); FlashFindEndOfServiceNameTableAddress(); FlashFindEndOfServiceTableAddress(0); FlashFindServiceAddress(0, 0, 0, 0); FlashFindTransponderIndex(0, 0, 0); FlashGetBlockStartAddress(0); FlashGetChannelNumber(0, 0, 0, 0); FlashGetSatelliteByIndex(0); FlashGetServiceByIndex(0, FALSE); FlashGetServiceByName (NULL, FALSE); FlashGetTransponderCByIndex(0); FlashGetTransponderSByIndex(0, 0); FlashGetTransponderTByIndex(0); FlashGetTrueLocalTime(0, 0); FlashGetType(); FlashInitialize(0); FlashProgram(); FlashReindexFavourites(0, 0, 0); FlashReindexTimers(0, 0, 0); FlashRemoveCASServices(FALSE); FlashRemoveServiceByIndex(0, FALSE); FlashRemoveServiceByIndexString(NULL, FALSE); FlashRemoveServiceByLCN(NULL, FALSE); FlashRemoveServiceByName(NULL, FALSE); FlashRemoveServiceByPartOfName(NULL, FALSE); FlashRemoveServiceByUHF(NULL, FALSE, FALSE); FlashServiceAddressToServiceIndex(NULL); FlashWrite(NULL, NULL, 0, NULL); FlushCache(NULL, 0); FreeOSDRegion(0); fwHook(0); GetAudioTrackPID(0, NULL); GetClusterPointer(0); GetCurrentEvent(NULL); GetEEPROMAddress(); GetEEPROMPin(); GetFrameBufferPixel(0, 0); GetFrameSize(0, 0); GetFWInfo(0, 0, 0, 0, 0, 0, 0, 0); GetHeapParameter(NULL, 0); GetLine(NULL, 0); GetOSDMapAddress(); GetOSDRegionHeight(0); GetOSDRegionWidth(0); GetPinStatus(); GetPIPPosition(NULL, NULL, NULL, NULL); getRECSlotAddress(); GetSysOsdControl(0); GetToppyString(0); HasEnoughItemMemory(); HDD_AAM_Disable(); HDD_AAM_Enable(0); HDD_APM_Disable(); HDD_APM_Enable(0); HDD_BigFile_Read(NULL, 0, 0, NULL); HDD_BigFile_Size(NULL); HDD_BigFile_Write(NULL, 0, 0, NULL); HDD_ChangeDir(NULL); HDD_DecodeRECHeader(NULL, NULL); HDD_EncodeRECHeader(NULL, NULL, 0); HDD_FappendOpen(NULL); HDD_FappendWrite(NULL, NULL); HDD_FindPCR(NULL, 0); HDD_FindPMT(NULL, 0, NULL); HDD_FreeSize(); HDD_GetClusterSize(); HDD_GetFileDir(NULL, 0, NULL); HDD_GetFirmwareDirCluster(); HDD_GetHddID(NULL, NULL, NULL); HDD_IdentifyDevice(NULL); HDD_isAnyRecording(); HDD_isCryptedStream(NULL, 0); HDD_isRecording(0); HDD_LiveFS_GetChainLength(0); HDD_LiveFS_GetFAT1Address(); HDD_LiveFS_GetFAT2Address(); HDD_LiveFS_GetFirstCluster(0); HDD_LiveFS_GetLastCluster(0); HDD_LiveFS_GetNextCluster(0); HDD_LiveFS_GetPreviousCluster(0); HDD_LiveFS_GetRootDirAddress(); HDD_LiveFS_GetSuperBlockAddress(); HDD_MakeNewRecName(NULL, 0); HDD_Move(NULL, NULL, NULL); HDD_ReadClusterDMA(0, NULL); HDD_ReadSector(0, 0); HDD_ReadSectorDMA(0, 0, NULL); HDD_RECSlotGetAddress(0); HDD_RECSlotIsPaused(0); HDD_RECSlotPause(0, FALSE); HDD_RECSlotSetDuration(0, 0); HDD_SetCryptFlag(NULL, 0); HDD_SetFileDateTime(NULL, 0, 0, 0); HDD_SetSkipFlag (NULL, FALSE); HDD_SetStandbyTimer(0); HDD_Smart_DisableAttributeAutoSave(); HDD_Smart_DisableOperations(); HDD_Smart_EnableAttributeAutoSave(); HDD_Smart_EnableOperations(); HDD_Smart_ExecuteOfflineImmediate(0); HDD_Smart_ReadData(0); HDD_Smart_ReadThresholdData(0); HDD_Smart_ReturnStatus(); HDD_Stop(); HDD_TAP_Callback(0, NULL, 0, 0, 0, 0); HDD_TAP_Disable(0, 0); HDD_TAP_DisableAll(0); HDD_TAP_DisabledEventHandler(0, 0, 0); HDD_TAP_GetCurrentDir(NULL); HDD_TAP_GetCurrentDirCluster(); HDD_TAP_GetIDByFileName(NULL); HDD_TAP_GetIDByIndex(0); HDD_TAP_GetIndexByID(0); HDD_TAP_GetInfo(0, NULL); HDD_TAP_GetStartParameter(); HDD_TAP_isAnyRunning(); HDD_TAP_isBatchMode(); HDD_TAP_isDisabled(0); HDD_TAP_isDisabledAll(); HDD_TAP_isRunning(0); HDD_TAP_SendEvent(0, FALSE, 0, 0, 0); HDD_TAP_SetCurrentDirCluster(0); HDD_TAP_Start(NULL, FALSE, NULL, NULL); HDD_TAP_StartedByTAP(); HDD_TAP_Terminate(0); HDD_TouchFile(NULL); HDD_TranslateDirCluster(0, NULL); HDD_TruncateFile(NULL, 0); HDD_Write(NULL, 0, NULL); HDD_WriteClusterDMA(0, NULL); HDD_WriteSectorDMA(0, 0, NULL); HookEnable(0, 0); HookExit(); HookIsEnabled(0); HookMIPS_Clear(0, 0, 0); HookMIPS_Set(0, 0, 0); HookSet(0, 0); IMEM_Alloc(0); IMEM_Init(0); IMEM_isInitialized(); IMEM_Compact(); IMEM_Free(NULL); IMEM_GetInfo(NULL, NULL); IMEM_Kill(); InfoTestGrid(); INICloseFile(); INIFindStartEnd(NULL, NULL, NULL, 0); INIGetARGB(NULL, NULL, NULL, NULL, NULL, 0); INIGetHexByte(NULL, 0, 0, 0); INIGetHexDWord(NULL, 0, 0, 0); INIGetHexWord(NULL, 0, 0, 0); INIGetInt(NULL, 0, 0, 0); INIGetString(NULL, NULL, NULL, 0); INIKillKey(NULL); INIOpenFile(NULL); INISaveFile(NULL); INISetARGB(NULL, 0, 0, 0, 0); INISetComment(NULL); INISetHexByte(NULL, 0); INISetHexDWord(NULL, 0); INISetHexWord(NULL, 0); INISetInt(NULL, 0); INISetString(NULL, NULL); initCodeWrapper(0); InitTAPAPIFix(); InitTAPex(); InteractiveGetStatus(); InteractiveSetStatus(FALSE); intLock(); intUnlock(0); isAnyOSDVisible(0, 0, 0, 0); isLegalChar(0, 0); isMasterpiece(); isMPMenu(); iso639_1(0); isOSDRegionAlive(0); isValidChannel(NULL); LangGetString(0); LangLoadStrings(NULL, 0, 0); LangUnloadStrings(); Log(NULL, NULL, FALSE, 0, NULL); LowerCase(NULL); MakeValidFileName(NULL, 0); MHEG_Status(); MPDisplayClearDisplay(); MPDisplayClearSegments(0, 0); MPDisplayDisplayLongString(NULL); MPDisplayDisplayShortString(NULL); MPDisplayGetDisplayByte(0); MPDisplayGetDisplayMask(0); MPDisplayInstallMPDisplayFwHook(); MPDisplaySetAmFlag(0); MPDisplaySetColonFlag(0); MPDisplaySetDisplayByte(0, 0); MPDisplaySetDisplayMask(0, 0); MPDisplaySetDisplayMemory(NULL); MPDisplaySetDisplayMode(0); MPDisplaySetPmFlag(0); MPDisplaySetSegments(0, 0); MPDisplayToggleSegments(0, 0); MPDisplayUninstallMPDisplayFwHook(); MPDisplayUpdateDisplay(); Now(NULL); OSDCopy(0, 0, 0, 0, 0, 0, 0); OSDLinesForeDirty(FALSE); ParseLine(NULL, NULL, 0); ProfileDirty(); ProfileInit(); ProfileLoad(NULL, FALSE); ProfileMayReload(); ReadEEPROM(0, 0, NULL); ReadIICRegister(0, 0, 0, 0, NULL); Reboot(0); ReceiveSector(0); RTrim(NULL); SaveBitmap(NULL, 0, 0, NULL); SendEvent(0, 0, 0, 0); SendEventHelper(NULL, 0, 0, 0); SendHDDCommand(0, 0, 0, 0, 0, 0, 0); SendToFP(NULL); SeparatePathComponents(NULL, NULL, NULL, NULL); SetCrashBehaviour(0); setSymbol14(0, 0); setSymbol17(0, 0); ShowMessageWin(NULL, NULL, NULL, 0); ShowMessageWindow(NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0); Shutdown(0); SoundSinus(0, 0, 0); StrEndsWith(NULL, NULL); stricstr(NULL, NULL); SubtitleGetStatus(); SubtitleSetStatus(FALSE); SuppressedAutoStart(); SwapDWords(0); SwapWords(0); TAP_Osd_PutFreeColorGd(0, 0, 0, NULL, FALSE, 0); TAPCOM_CloseChannel(NULL); TAPCOM_Finish(NULL, 0); TAPCOM_GetChannel(0, NULL, NULL, NULL, NULL); TAPCOM_GetReturnValue(NULL); TAPCOM_GetStatus(NULL); TAPCOM_LastAlive(NULL); TAPCOM_OpenChannel(0, 0, 0, NULL); TAPCOM_Reject(NULL); TAPCOM_StillAlive(NULL); TFDSize(NULL); TimeDiff(0, 0); TimeFormat(0, 0, 0); TunerGet(0); TunerSet(0); UncompressBlock(NULL, 0, NULL, 0); UncompressedFirmwareSize(NULL); UncompressedLoaderSize(NULL); UncompressedTFDSize(NULL); UncompressFirmware(NULL, NULL, NULL); UncompressLoader(NULL, NULL, NULL); UncompressTFD(NULL, NULL, NULL); UpperCase(NULL); ValidFileName(NULL, 0); WindowDirty(); WriteIICRegister(0, 0, 0, 0, NULL); YUV2RGB(0, 0, 0, NULL, NULL, NULL); YUV2RGB2(0, 0, 0, NULL, NULL, NULL); return 0; }
void __cdecl main() { int screenshot = 0; InitialiseD3D(); g_pGamePads = new c_GamePads(); g_pWorld = new c_World(g_pD3DDevice, g_pGamePads); D3DVIEWPORT8 viewport; viewport.Height = 5000; viewport.Width = 5000; viewport.X = 0; viewport.Y = 0; viewport.MinZ = 0.0f; viewport.MaxZ = 1.0f; DWORD WinnerColor = D3DCOLOR_XRGB(0, 0, 100); g_pWorld->pPlayer[0]->Dead = 1; g_pWorld->pPlayer[1]->Dead = 1; //DWORD musicresult = 0; //CWMAFileStream music; //music.Initialize("D:\\song1.wma"); //XVideo video; //video.LoadVideo("D:\\test.xmv"); //video.PlayVideo(); if(g_pWorld->pPlayer[0]->Dead != 0 && g_pWorld->pPlayer[1]->Dead != 0) { WinnerColor = D3DCOLOR_XRGB(150, 0, 0); g_pWorld->pPlayer[0]->Dead = 0; g_pWorld->pPlayer[0]->TransX = 2.5f; g_pWorld->pPlayer[0]->TransY = 5.0f; g_pWorld->pPlayer[0]->Theta = 3.1415f/2.0f; g_pWorld->pPlayer[0]->Phi = 3.1415f/2.0f; g_pWorld->pPlayer[0]->Firing = 0; g_pWorld->pPlayer[1]->Dead = 0; g_pWorld->pPlayer[1]->TransX = 2.5f; g_pWorld->pPlayer[1]->TransY = 80.0f - 5.0f; g_pWorld->pPlayer[1]->Theta = -3.1415f/2.0f; g_pWorld->pPlayer[1]->Phi = 3.1415f/2.0f; g_pWorld->pPlayer[1]->Firing = 0; g_pWorld->pPlayer[2]->Dead = 0; g_pWorld->pPlayer[2]->TransX = 180.0f - 2.5f; g_pWorld->pPlayer[2]->TransY = 5.0f; g_pWorld->pPlayer[2]->Theta = 3.1415f/2.0f; g_pWorld->pPlayer[2]->Phi = 3.1415f/2.0f; g_pWorld->pPlayer[2]->Firing = 0; g_pWorld->pPlayer[3]->Dead = 0; g_pWorld->pPlayer[3]->TransX = 180.0f - 2.5f; g_pWorld->pPlayer[3]->TransY = 80.0f - 5.0f; g_pWorld->pPlayer[3]->Theta = -3.1415f/2.0f; g_pWorld->pPlayer[3]->Phi = 3.1415f/2.0f; g_pWorld->pPlayer[3]->Firing = 0; g_pWorld->bfirstblood = 0; g_pWorld->rumble->Play(0); for(int i=0; i<150; i++) { g_pWorld->Balls[i].State = 0; } g_pWorld->wait = 1200; } while(true) { //music.Process(&musicresult); //DirectSoundDoWork(); g_pGamePads->GetInput(); if( (g_pGamePads->pGP1->wButtons & XINPUT_GAMEPAD_START) && (g_pGamePads->pGP1->wButtons & XINPUT_GAMEPAD_BACK) ) ReBoot(); if(g_pGamePads->pGP1->wButtons & XINPUT_GAMEPAD_DPAD_DOWN) { if(screenshot == 0) { screenshot = 1; CaptureScreen(g_pD3DDevice, "D:\\screen.bmp"); } } if(g_pWorld->pPlayer[0]->Dead != 0 && g_pWorld->pPlayer[1]->Dead != 0) { WinnerColor = D3DCOLOR_XRGB(150, 0, 0); g_pWorld->pPlayer[0]->Dead = 0; g_pWorld->pPlayer[0]->TransX = 2.5f; g_pWorld->pPlayer[0]->TransY = 5.0f; g_pWorld->pPlayer[0]->Theta = 3.1415f/2.0f; g_pWorld->pPlayer[0]->Phi = 3.1415f/2.0f; g_pWorld->pPlayer[0]->Firing = 0; g_pWorld->pPlayer[1]->Dead = 0; g_pWorld->pPlayer[1]->TransX = 2.5f; g_pWorld->pPlayer[1]->TransY = 80.0f - 5.0f; g_pWorld->pPlayer[1]->Theta = -3.1415f/2.0f; g_pWorld->pPlayer[1]->Phi = 3.1415f/2.0f; g_pWorld->pPlayer[1]->Firing = 0; g_pWorld->pPlayer[2]->Dead = 0; g_pWorld->pPlayer[2]->TransX = 180.0f - 2.5f; g_pWorld->pPlayer[2]->TransY = 5.0f; g_pWorld->pPlayer[2]->Theta = 3.1415f/2.0f; g_pWorld->pPlayer[2]->Phi = 3.1415f/2.0f; g_pWorld->pPlayer[2]->Firing = 0; g_pWorld->pPlayer[3]->Dead = 0; g_pWorld->pPlayer[3]->TransX = 180.0f - 2.5f; g_pWorld->pPlayer[3]->TransY = 80.0f - 5.0f; g_pWorld->pPlayer[3]->Theta = -3.1415f/2.0f; g_pWorld->pPlayer[3]->Phi = 3.1415f/2.0f; g_pWorld->pPlayer[3]->Firing = 0; g_pWorld->bfirstblood = 0; g_pWorld->redwins->Play(0); (g_pWorld->CurrLevel)++; if(g_pWorld->CurrLevel == 5) g_pWorld->CurrLevel = 0; (g_pWorld->Boards) = &((g_pWorld->BoardsAll)[g_pWorld->CurrLevel][0]); for(int i=0; i<150; i++) { g_pWorld->Balls[i].State = 0; } g_pWorld->wait = 800; } if(g_pWorld->pPlayer[2]->Dead != 0 && g_pWorld->pPlayer[3]->Dead != 0) { WinnerColor = D3DCOLOR_XRGB(0, 0, 150); g_pWorld->pPlayer[0]->Dead = 0; g_pWorld->pPlayer[0]->TransX = 2.5f; g_pWorld->pPlayer[0]->TransY = 5.0f; g_pWorld->pPlayer[0]->Theta = 3.1415f/2.0f; g_pWorld->pPlayer[0]->Phi = 3.1415f/2.0f; g_pWorld->pPlayer[0]->Firing = 0; g_pWorld->pPlayer[1]->Dead = 0; g_pWorld->pPlayer[1]->TransX = 2.5f; g_pWorld->pPlayer[1]->TransY = 80.0f - 5.0f; g_pWorld->pPlayer[1]->Theta = -3.1415f/2.0f; g_pWorld->pPlayer[1]->Phi = 3.1415f/2.0f; g_pWorld->pPlayer[1]->Firing = 0; g_pWorld->pPlayer[2]->Dead = 0; g_pWorld->pPlayer[2]->TransX = 180.0f - 2.5f; g_pWorld->pPlayer[2]->TransY = 5.0f; g_pWorld->pPlayer[2]->Theta = 3.1415f/2.0f; g_pWorld->pPlayer[2]->Phi = 3.1415f/2.0f; g_pWorld->pPlayer[2]->Firing = 0; g_pWorld->pPlayer[3]->Dead = 0; g_pWorld->pPlayer[3]->TransX = 180.0f - 2.5f; g_pWorld->pPlayer[3]->TransY = 80.0f - 5.0f; g_pWorld->pPlayer[3]->Theta = -3.1415f/2.0f; g_pWorld->pPlayer[3]->Phi = 3.1415f/2.0f; g_pWorld->pPlayer[3]->Firing = 0; g_pWorld->bfirstblood = 0; g_pWorld->bluewins->Play(0); (g_pWorld->CurrLevel)++; if(g_pWorld->CurrLevel == 5) g_pWorld->CurrLevel = 0; (g_pWorld->Boards) = &((g_pWorld->BoardsAll)[g_pWorld->CurrLevel][0]); for(int i=0; i<150; i++) { g_pWorld->Balls[i].State = 0; } g_pWorld->wait = 800; } g_pD3DDevice->SetViewport(&viewport); g_pD3DDevice->Clear(0, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER, WinnerColor, 0.0f, 0); g_pD3DDevice->BeginScene(); g_pWorld->UpdateWorld(); g_pD3DDevice->EndScene(); g_pD3DDevice->Present(NULL, NULL, NULL, NULL); } }