mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2024-11-25 21:14:22 +01:00
Rename peer->network (thank you, eclipse!)
This commit is contained in:
parent
7b3cd3555a
commit
a0fb08b79f
@ -214,7 +214,7 @@ public:
|
||||
char server_hostname[255];
|
||||
int server_port;
|
||||
int network_connection_type;
|
||||
Network *peer;
|
||||
Network *network;
|
||||
int linecnt;
|
||||
|
||||
bool fake_key_sequence;
|
||||
|
@ -60,12 +60,12 @@ void C64::c64_ctor1(void)
|
||||
sizeof(this->server_hostname));
|
||||
this->server_port = 46214;
|
||||
this->network_connection_type = NONE;
|
||||
this->peer = NULL;
|
||||
this->network = NULL;
|
||||
|
||||
if (network_server_connect) {
|
||||
printf("Connecting to %s\n", network_server_connect);
|
||||
strcpy(this->server_hostname, network_server_connect);
|
||||
this->peer = new Network(this->server_hostname, this->server_port);
|
||||
this->network = new Network(this->server_hostname, this->server_port);
|
||||
this->network_connection_type = CONNECT;
|
||||
}
|
||||
}
|
||||
@ -150,9 +150,9 @@ void C64::network_vblank()
|
||||
Uint32 now = SDL_GetTicks();
|
||||
#endif
|
||||
|
||||
if (this->peer) {
|
||||
if (this->network) {
|
||||
Uint8 *master = this->TheDisplay->BitmapBase();
|
||||
Network *remote = this->peer;
|
||||
Network *remote = this->network;
|
||||
uint8 *js;
|
||||
static bool has_throttled;
|
||||
|
||||
@ -161,7 +161,7 @@ void C64::network_vblank()
|
||||
if (this->network_connection_type != CONNECT)
|
||||
remote->Disconnect();
|
||||
delete remote;
|
||||
this->peer = NULL;
|
||||
this->network = NULL;
|
||||
return;
|
||||
}
|
||||
|
||||
@ -172,10 +172,10 @@ void C64::network_vblank()
|
||||
else
|
||||
js = &TheCIA1->Joystick2;
|
||||
} else if (this->network_connection_type == CONNECT) {
|
||||
network_connection_error_t err = this->peer->ConnectFSM();
|
||||
network_connection_error_t err = this->network->ConnectFSM();
|
||||
|
||||
if (err == OK) {
|
||||
if (this->peer->is_master)
|
||||
if (this->network->is_master)
|
||||
this->network_connection_type = MASTER;
|
||||
else
|
||||
this->network_connection_type = CLIENT;
|
||||
@ -186,7 +186,7 @@ void C64::network_vblank()
|
||||
if (err == VERSION_ERROR)
|
||||
Gui::gui->status_bar->queueMessage("Get a new version at http://www.c64-network.org");
|
||||
delete remote;
|
||||
this->peer = NULL;
|
||||
this->network = NULL;
|
||||
}
|
||||
return;
|
||||
} else {
|
||||
@ -205,7 +205,7 @@ void C64::network_vblank()
|
||||
/* Disconnect or sending crap, remove this guy! */
|
||||
Gui::gui->status_bar->queueMessage("Peer disconnected");
|
||||
delete remote;
|
||||
this->peer = NULL;
|
||||
this->network = NULL;
|
||||
if (this->network_connection_type == CLIENT)
|
||||
this->Reset();
|
||||
this->network_connection_type = NONE;
|
||||
|
@ -926,7 +926,7 @@ void MOS6581::EmulateLine(void)
|
||||
static NetworkUpdateSoundInfo *cur = NULL;
|
||||
|
||||
if (!cur) {
|
||||
cur = TheC64->peer->DequeueSound();
|
||||
cur = TheC64->network->DequeueSound();
|
||||
}
|
||||
|
||||
while (cur) {
|
||||
@ -936,7 +936,7 @@ void MOS6581::EmulateLine(void)
|
||||
break;
|
||||
/* Delayed long enough - write to the SID! */
|
||||
this->WriteRegister(cur->adr, cur->val);
|
||||
cur = TheC64->peer->DequeueSound();
|
||||
cur = TheC64->network->DequeueSound();
|
||||
}
|
||||
}
|
||||
if (TheC64->network_connection_type == MASTER ||
|
||||
@ -951,7 +951,7 @@ void DigitalRenderer::WriteRegister(uint16 adr, uint8 byte)
|
||||
|
||||
if (TheC64) {
|
||||
if (TheC64->network_connection_type == MASTER)
|
||||
TheC64->peer->RegisterSidWrite(TheC64->linecnt, adr, byte);
|
||||
TheC64->network->RegisterSidWrite(TheC64->linecnt, adr, byte);
|
||||
}
|
||||
|
||||
int v = adr/7; // Voice number
|
||||
|
@ -210,11 +210,11 @@ public:
|
||||
{
|
||||
PeerInfo *peer = this->peers[which - 1];
|
||||
|
||||
TheC64->peer->SelectPeer(peer->hostname,
|
||||
TheC64->network->SelectPeer(peer->hostname,
|
||||
peer->public_port, peer->server_id);
|
||||
}
|
||||
else
|
||||
TheC64->peer->CancelPeerSelection();
|
||||
TheC64->network->CancelPeerSelection();
|
||||
Gui::gui->popView();
|
||||
}
|
||||
|
||||
@ -229,7 +229,7 @@ public:
|
||||
|
||||
virtual void escapeCallback(int which)
|
||||
{
|
||||
TheC64->peer->CancelPeerSelection();
|
||||
TheC64->network->CancelPeerSelection();
|
||||
Gui::gui->popView();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user