31
Feature requests / Re: Image rotation
« on: April 10, 2012, 05:42:31 pm »
Couldn't you rotate a sprite and render it to an image?
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
It seems that the monitor can not redraw fast enough and the sprites seem to leave a trail a few pixels, as it's not cleaning the old sprite position
#include <iostream>
#include <winsock.h>
int main(int argc, char** argv)
{
WSAData wsaData;
if( WSAStartup(MAKEWORD(1, 1), &wsaData) != 0 )
return 1;
char ac[80];
if(gethostname(ac, sizeof(ac)) == SOCKET_ERROR)
{
cerr << "Error " << WSAGetLastError() <<
" when getting local host name." << endl;
return 1;
}
cout << "Host name is " << ac << "." << endl;
struct hostent *phe = gethostbyname(ac);
if(phe == 0)
{
cerr << "Bad host lookup." << endl;
return 1;
}
for(int i = 0; phe->h_addr_list[i] != 0; ++i)
{
struct in_addr addr;
memcpy(&addr, phe->h_addr_list[i], sizeof(struct in_addr));
cout << "Address " << i << ": " << inet_ntoa(addr) << endl;
}
WSACleanup();
getchar();
return 0;
}
// Connect the socket to localhost on any port
sockaddr_in address = CreateAddress(ntohl(INADDR_LOOPBACK), 0);
if (connect(sock, reinterpret_cast<sockaddr*>(&address), sizeof(address)) == -1)
{
priv::SocketImpl::Close(sock);
return localAddress;
}