mirror of
https://github.com/CraftyBoss/SuperMarioOdysseyOnline.git
synced 2024-11-22 03:05:16 +00:00
Success and receive spelling
This commit is contained in:
parent
8c992649fd
commit
76d61a8067
6 changed files with 17 additions and 17 deletions
|
@ -37,8 +37,8 @@ namespace al {
|
||||||
al::GameDrawInfo *mDrawInfo; // 0x38 from Application::sInstance + 0x30
|
al::GameDrawInfo *mDrawInfo; // 0x38 from Application::sInstance + 0x30
|
||||||
ProjectNfpDirector *mProjNfpDirector; // 0x48
|
ProjectNfpDirector *mProjNfpDirector; // 0x48
|
||||||
al::HtmlViewer *mHtmlViewer; // 0x50
|
al::HtmlViewer *mHtmlViewer; // 0x50
|
||||||
ApplicationMessageReceiver *mMessageReciever; // 0x58
|
ApplicationMessageReceiver *mMessageReceiver; // 0x58
|
||||||
al::WaveVibrationHolder *mWaveVibrationHolder; // 0x60
|
al::WaveVibrationHolder *mWaveVibrationHolder; // 0x60
|
||||||
void *gap2;
|
void *gap2;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -219,7 +219,7 @@ class Client {
|
||||||
|
|
||||||
// --- Server Syncing Members ---
|
// --- Server Syncing Members ---
|
||||||
|
|
||||||
// array of shine IDs for checking if multiple shines have been collected in quick sucession, all moons within the players stage that match the ID will be deleted
|
// array of shine IDs for checking if multiple shines have been collected in quick succession, all moons within the players stage that match the ID will be deleted
|
||||||
sead::SafeArray<int, 128> curCollectedShines;
|
sead::SafeArray<int, 128> curCollectedShines;
|
||||||
int collectedShineCount = 0;
|
int collectedShineCount = 0;
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ PuppetHolder::PuppetHolder(int size) {
|
||||||
* @brief resizes puppet ptr array by creating a new ptr array and storing previous ptrs in it, before freeing the previous array
|
* @brief resizes puppet ptr array by creating a new ptr array and storing previous ptrs in it, before freeing the previous array
|
||||||
*
|
*
|
||||||
* @param size the size of the new ptr array
|
* @param size the size of the new ptr array
|
||||||
* @return returns true if resizing was sucessful
|
* @return returns true if resizing was successful
|
||||||
*/
|
*/
|
||||||
bool PuppetHolder::resizeHolder(int size) {
|
bool PuppetHolder::resizeHolder(int size) {
|
||||||
|
|
||||||
|
@ -106,4 +106,4 @@ bool PuppetHolder::checkInfoIsInStage(PuppetInfo *info) {
|
||||||
void PuppetHolder::setStageInfo(const char *stageName, u8 scenarioNo) {
|
void PuppetHolder::setStageInfo(const char *stageName, u8 scenarioNo) {
|
||||||
mStageName = stageName;
|
mStageName = stageName;
|
||||||
mScenarioNo = scenarioNo;
|
mScenarioNo = scenarioNo;
|
||||||
}
|
}
|
||||||
|
|
|
@ -90,13 +90,13 @@ void Client::init(al::LayoutInitInfo const &initInfo, GameDataHolderAccessor hol
|
||||||
/**
|
/**
|
||||||
* @brief starts client read thread
|
* @brief starts client read thread
|
||||||
*
|
*
|
||||||
* @return true if read thread was sucessfully started
|
* @return true if read thread was succesfully started
|
||||||
* @return false if read thread was unable to start, or thread was already started.
|
* @return false if read thread was unable to start, or thread was already started.
|
||||||
*/
|
*/
|
||||||
bool Client::startThread() {
|
bool Client::startThread() {
|
||||||
if(mReadThread->isDone() ) {
|
if(mReadThread->isDone() ) {
|
||||||
mReadThread->start();
|
mReadThread->start();
|
||||||
Logger::log("Read Thread Sucessfully Started.\n");
|
Logger::log("Read Thread Successfully Started.\n");
|
||||||
return true;
|
return true;
|
||||||
}else {
|
}else {
|
||||||
Logger::log("Read Thread has already started! Or other unknown reason.\n");
|
Logger::log("Read Thread has already started! Or other unknown reason.\n");
|
||||||
|
@ -132,7 +132,7 @@ void Client::restartConnection() {
|
||||||
sInstance->mHeap->free(playerDC);
|
sInstance->mHeap->free(playerDC);
|
||||||
|
|
||||||
if (sInstance->mSocket->closeSocket()) {
|
if (sInstance->mSocket->closeSocket()) {
|
||||||
Logger::log("Sucessfully Closed Socket.\n");
|
Logger::log("Succesfully Closed Socket.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
Logger::log("Waiting for send/recv threads to finish.\n");
|
Logger::log("Waiting for send/recv threads to finish.\n");
|
||||||
|
@ -145,7 +145,7 @@ void Client::restartConnection() {
|
||||||
|
|
||||||
if(sInstance->mSocket->getLogState() == SOCKET_LOG_CONNECTED) {
|
if(sInstance->mSocket->getLogState() == SOCKET_LOG_CONNECTED) {
|
||||||
|
|
||||||
Logger::log("Reconnect Sucessful!\n");
|
Logger::log("Reconnect Succesful!\n");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Logger::log("Reconnect Unsuccessful.\n");
|
Logger::log("Reconnect Unsuccessful.\n");
|
||||||
|
@ -187,7 +187,7 @@ bool Client::startConnection() {
|
||||||
|
|
||||||
if (mIsConnectionActive) {
|
if (mIsConnectionActive) {
|
||||||
|
|
||||||
Logger::log("Sucessful Connection. Waiting to recieve init packet.\n");
|
Logger::log("Succesful Connection. Waiting to receive init packet.\n");
|
||||||
|
|
||||||
bool waitingForInitPacket = true;
|
bool waitingForInitPacket = true;
|
||||||
// wait for client init packet
|
// wait for client init packet
|
||||||
|
@ -211,7 +211,7 @@ bool Client::startConnection() {
|
||||||
mHeap->free(curPacket);
|
mHeap->free(curPacket);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Logger::log("Recieve failed! Stopping Connection.\n");
|
Logger::log("Receive failed! Stopping Connection.\n");
|
||||||
mIsConnectionActive = false;
|
mIsConnectionActive = false;
|
||||||
waitingForInitPacket = false;
|
waitingForInitPacket = false;
|
||||||
}
|
}
|
||||||
|
@ -336,7 +336,7 @@ void Client::readFunc() {
|
||||||
|
|
||||||
while(mIsConnectionActive) {
|
while(mIsConnectionActive) {
|
||||||
|
|
||||||
Packet *curPacket = mSocket->tryGetPacket(); // will block until a packet has been recieved, or socket disconnected
|
Packet *curPacket = mSocket->tryGetPacket(); // will block until a packet has been received, or socket disconnected
|
||||||
|
|
||||||
if (curPacket) {
|
if (curPacket) {
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ nn::Result SocketClient::init(const char* ip, u16 port) {
|
||||||
|
|
||||||
Logger::log("Socket fd: %d\n", socket_log_socket);
|
Logger::log("Socket fd: %d\n", socket_log_socket);
|
||||||
|
|
||||||
startThreads(); // start recv and send threads after sucessful connection
|
startThreads(); // start recv and send threads after succesful connection
|
||||||
|
|
||||||
// send init packet to server once we connect (an issue with the server prevents this from working properly, waiting for a fix to implement)
|
// send init packet to server once we connect (an issue with the server prevents this from working properly, waiting for a fix to implement)
|
||||||
|
|
||||||
|
@ -470,7 +470,7 @@ bool SocketClient::stringToIPAddress(const char* str, in_addr* out) {
|
||||||
/**
|
/**
|
||||||
* @brief starts client read thread
|
* @brief starts client read thread
|
||||||
*
|
*
|
||||||
* @return true if read thread was sucessfully started
|
* @return true if read thread was successfully started
|
||||||
* @return false if read thread was unable to start, or thread was already started.
|
* @return false if read thread was unable to start, or thread was already started.
|
||||||
*/
|
*/
|
||||||
bool SocketClient::startThreads() {
|
bool SocketClient::startThreads() {
|
||||||
|
@ -481,7 +481,7 @@ bool SocketClient::startThreads() {
|
||||||
if(this->mRecvThread->isDone() && this->mSendThread->isDone()) {
|
if(this->mRecvThread->isDone() && this->mSendThread->isDone()) {
|
||||||
this->mRecvThread->start();
|
this->mRecvThread->start();
|
||||||
this->mSendThread->start();
|
this->mSendThread->start();
|
||||||
Logger::log("Socket threads sucessfully started.\n");
|
Logger::log("Socket threads succesfully started.\n");
|
||||||
return true;
|
return true;
|
||||||
}else {
|
}else {
|
||||||
Logger::log("Socket threads failed to start.\n");
|
Logger::log("Socket threads failed to start.\n");
|
||||||
|
|
|
@ -111,7 +111,7 @@ void Logger::log(const char* fmt, ...) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Logger::pingSocket() {
|
bool Logger::pingSocket() {
|
||||||
return socket_log("ping") > 0; // if value is greater than zero, than the socket recieved our message, otherwise the connection was lost.
|
return socket_log("ping") > 0; // if value is greater than zero, than the socket received our message, otherwise the connection was lost.
|
||||||
}
|
}
|
||||||
|
|
||||||
void tryInitSocket() {
|
void tryInitSocket() {
|
||||||
|
@ -119,4 +119,4 @@ void tryInitSocket() {
|
||||||
#if DEBUGLOG
|
#if DEBUGLOG
|
||||||
Logger::createInstance(); // creates a static instance for debug logger
|
Logger::createInstance(); // creates a static instance for debug logger
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue