You have to get the right libraries, which I got a while ago from a site which I don't think is around anymore. The libraries I have are not the current ones for DirectX 9.0, some of the functions use older definitions. However, it works perfectly fine for me. If anyone is able to find current versions of the necessary .a libraries for DirectX, I'd love to hear about it.
I don't know how much code to post, becuase there is little else that could be relevant to it.
First call:
Code:
if(CheckWon(team)) {
MessageBox(hWnd, "Player wins!", "Congratulations!", MB_ICONEXCLAMATION | MB_TOPMOST | MB_SETFOREGROUND | MB_OK);
started = false;
menu = !menu;
g_pd3dDevice->ShowCursor(false);
g_pd3dDevice->SetCursorProperties(0, 0, g_pCursorMenu);
g_pd3dDevice->ShowCursor(true);
started = false;
Cleanup();
PostQuitMessage(0);
return;
}
Second call:
Code:
if(CheckWon(aiteam)) {
MessageBox(hWnd, "Computer wins!", "You Suck!", MB_ICONEXCLAMATION | MB_TOPMOST | MB_SETFOREGROUND | MB_OK);
started = false;
menu = !menu;
g_pd3dDevice->ShowCursor(false);
g_pd3dDevice->SetCursorProperties(0, 0, g_pCursorMenu);
g_pd3dDevice->ShowCursor(true);
return;
}
Third call:
Code:
if(squares[0][0] != 0 && squares[0][1] != 0 && squares[0][2] != 0 && squares[1][0] != 0 && squares[1][1] != 0 &&
squares[1][2] != 0 && squares[2][0] != 0 && squares[2][1] != 0 && squares[2][2] != 0) {
MessageBox(hWnd, "Draw!", "No One Wins!", MB_ICONEXCLAMATION | MB_TOPMOST | MB_SETFOREGROUND | MB_OK);
started = false;
menu = !menu;
g_pd3dDevice->ShowCursor(false);
g_pd3dDevice->SetCursorProperties(0, 0, g_pCursorMenu);
g_pd3dDevice->ShowCursor(true);
}
I don't see anything wrong with any of my code, however perhaps it is something I don't know about.