fprintf(stderr,"failed to make goodpixel pipeline\n");
Log("Failed to make goodpixel pipeline\n");
exit(-1);
quit_with_popup("Couldn't make a shader! Uhhh ooooohhhhhh!!!","Shader error BONED");
}
}
}
}
}
}
@ -646,8 +642,9 @@ static void init(void)
{
{
if(enet_initialize()!=0)
if(enet_initialize()!=0)
{
{
fprintf(stderr,"An error occurred while initializing ENet.\n");
exit(-1);
Log("An error occurred while initializing ENet.\n");
quit_with_popup("Failed to initialize networking, enet error","Networking Error");
}
}
client=enet_host_create(NULL/* create a client host */,
client=enet_host_create(NULL/* create a client host */,
1/* only allow 1 outgoing connection */,
1/* only allow 1 outgoing connection */,
@ -656,10 +653,8 @@ static void init(void)
0/* assume any amount of outgoing bandwidth */);
0/* assume any amount of outgoing bandwidth */);
if(client==NULL)
if(client==NULL)
{
{
fprintf(
Log("An error occurred while trying to create an ENet client host.\n");
stderr,
quit_with_popup("Failed to initialize the networking. Mama mia!","Networking uh oh");
"An error occurred while trying to create an ENet client host.\n");
exit(-1);
}
}
ENetAddressaddress;
ENetAddressaddress;
ENetEventevent;
ENetEventevent;
@ -670,9 +665,8 @@ static void init(void)
peer=enet_host_connect(client,&address,2,0);
peer=enet_host_connect(client,&address,2,0);
if(peer==NULL)
if(peer==NULL)
{
{
fprintf(stderr,
Log("No available peers for initiating an ENet connection.\n");
"No available peers for initiating an ENet connection.\n");
quit_with_popup("Failed to initialize the networking. Mama mia!","Networking uh oh");
exit(-1);
}
}
// the timeout is the third parameter here
// the timeout is the third parameter here
if(enet_host_service(client,&event,5000)>0&&
if(enet_host_service(client,&event,5000)>0&&
@ -687,7 +681,7 @@ static void init(void)
/* had run out without any significant event. */
/* had run out without any significant event. */
enet_peer_reset(peer);
enet_peer_reset(peer);
Log("Failed to connect to server. It might be too full\n");
Log("Failed to connect to server. It might be too full\n");
quit_with_popup("Failed to connect to server. Is your wifi down? It took too long.","Connection Failure");
quit_with_popup("Failed to connect to server. Is your wifi down? It took too long. The server could also be too full. I unfortunately do not have information as to which issue it is at this time. It could also be that the server is down. I hate this networking library","Connection Failure");
}
}
}
}
}
}
@ -1508,8 +1502,8 @@ static void frame(void)
caseENET_EVENT_TYPE_DISCONNECT:
caseENET_EVENT_TYPE_DISCONNECT:
{
{
fprintf(stderr,"Disconnected from server\n");
Log("Disconnected from server\n");
exit(-1);
quit_with_popup("Disconnected from server","Disconnected");