mirror of
https://github.com/CTR-tools/CTR-ModSDK.git
synced 2024-11-30 08:50:33 +00:00
put all logging behind #ifdef PINE_DEBUG
This commit is contained in:
parent
e4bb15dee3
commit
7c6f528f2f
@ -146,7 +146,9 @@ struct OnlineCTR
|
||||
char sleepControl;
|
||||
char gpuSubmitTooLate;
|
||||
char enableDeferredGPU;
|
||||
#ifdef PINE_DEBUG
|
||||
int stateChangeCounter;
|
||||
#endif
|
||||
};
|
||||
|
||||
STATIC_ASSERT2(sizeof(struct OnlineCTR) <= 0x400, "Size of OnlineCTR must be lte 1kb");
|
||||
|
@ -170,7 +170,9 @@ void OnlineInit_Drivers(struct GameTracker* gGT)
|
||||
if (gGT->levelID != 0x26)
|
||||
{
|
||||
octr->CurrState = GAME_WAIT_FOR_RACE;
|
||||
#ifdef PINE_DEBUG
|
||||
printf("statechange %d GAME_WAIT_FOR_RACE 1: \n", octr->stateChangeCounter++);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@ -193,7 +195,9 @@ void OnlineEndOfRace()
|
||||
(octr->CurrState < GAME_START_RACE)) { return; }
|
||||
|
||||
octr->CurrState = GAME_END_RACE;
|
||||
#ifdef PINE_DEBUG
|
||||
printf("statechange %d GAME_END_RACE 2: \n", octr->stateChangeCounter++);
|
||||
#endif
|
||||
|
||||
static unsigned frameCounter = 0;
|
||||
EndOfRace_Camera();
|
||||
|
@ -126,13 +126,17 @@ void StatePS1_Lobby_AssignRole()
|
||||
if(octr->DriverID == 0)
|
||||
{
|
||||
octr->CurrState = LOBBY_HOST_TRACK_PICK;
|
||||
#ifdef PINE_DEBUG
|
||||
printf("statechange %d LOBBY_HOST_TRACK_PICK 3: \n", octr->stateChangeCounter++);
|
||||
#endif
|
||||
}
|
||||
|
||||
else if (octr->DriverID > 0)
|
||||
{
|
||||
octr->CurrState = LOBBY_GUEST_TRACK_WAIT;
|
||||
#ifdef PINE_DEBUG
|
||||
printf("statechange %d LOBBY_GUEST_TRACK_WAIT 4: \n", octr->stateChangeCounter++);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,9 @@ void ThreadFunc(struct Thread* t)
|
||||
// if closed==1, go to 0 ("please open client")
|
||||
// if closed==0, go to 1 (server select)
|
||||
octr->CurrState = !boolCloseClient;
|
||||
#ifdef PINE_DEBUG
|
||||
printf("statechange %d yesno open client/server select 5: \n", octr->stateChangeCounter++);
|
||||
#endif
|
||||
|
||||
octr->serverLockIn1 = 0;
|
||||
octr->serverLockIn2 = 0;
|
||||
@ -110,7 +112,9 @@ void ThreadFunc(struct Thread* t)
|
||||
// if closed==1, go to 0 ("please open client")
|
||||
// if closed==0, go to 1 (server select)
|
||||
octr->CurrState = !boolCloseClient;
|
||||
#ifdef PINE_DEBUG
|
||||
printf("statechange %d yesno open client/server select 6: \n", octr->stateChangeCounter++);
|
||||
#endif
|
||||
|
||||
// stop music,
|
||||
// stop "most FX", let menu FX ring
|
||||
|
@ -28,6 +28,7 @@
|
||||
#define USE_RAMEX
|
||||
#define USE_BIGQUEUE
|
||||
#define USE_HIGH1P
|
||||
//#define PINE_DEBUG //enable this for logging of CurrState change on game and client.
|
||||
#endif
|
||||
|
||||
#ifdef USE_60FPS
|
||||
|
@ -137,14 +137,18 @@ void ProcessReceiveEvent(ENetPacket* packet)
|
||||
if (r->version != VERSION)
|
||||
{
|
||||
octr.get()->CurrState = LAUNCH_ERROR;
|
||||
#ifdef PINE_DEBUG
|
||||
printf("statechange %d LAUNCH_ERROR 7: version mismatch\n", octr.get()->stateChangeCounter++);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
if (octr.get()->ver_psx != VERSION)
|
||||
{
|
||||
octr.get()->CurrState = LAUNCH_ERROR;
|
||||
#ifdef PINE_DEBUG
|
||||
printf("statechange %d LAUNCH_ERROR 8: version mismatch\n", octr.get()->stateChangeCounter++);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
@ -242,7 +246,9 @@ void ProcessReceiveEvent(ENetPacket* packet)
|
||||
|
||||
// choose to get host menu or guest menu
|
||||
octr.get()->CurrState = LOBBY_ASSIGN_ROLE;
|
||||
#ifdef PINE_DEBUG
|
||||
printf("statechange %d LOBBY_ASSIGN_ROLE 9: new client\n", octr.get()->stateChangeCounter++);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
@ -293,7 +299,9 @@ void ProcessReceiveEvent(ENetPacket* packet)
|
||||
|
||||
octr.get()->levelID = r->trackID;
|
||||
octr.get()->CurrState = LOBBY_CHARACTER_PICK;
|
||||
#ifdef PINE_DEBUG
|
||||
printf("statechange %d LOBBY_CHARACTER_PICK 10: track was selected\n", octr.get()->stateChangeCounter++);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
@ -322,14 +330,18 @@ void ProcessReceiveEvent(ENetPacket* packet)
|
||||
// so screen updates with green names
|
||||
octr.get()->CountPressX = 0;
|
||||
octr.get()->CurrState = LOBBY_START_LOADING;
|
||||
#ifdef PINE_DEBUG
|
||||
printf("statechange %d LOBBY_START_LOADING 11: game starting?\n", octr.get()->stateChangeCounter++);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
case SG_STARTRACE:
|
||||
{
|
||||
octr.get()->CurrState = GAME_START_RACE;
|
||||
#ifdef PINE_DEBUG
|
||||
printf("statechange %d GAME_START_RACE 12: start race\n", octr.get()->stateChangeCounter++);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
@ -519,7 +531,9 @@ void ProcessNewMessages()
|
||||
|
||||
// to go the lobby browser
|
||||
octr.get()->CurrState = -1;
|
||||
#ifdef PINE_DEBUG
|
||||
printf("statechange %d (-1) 13: enet disconnected\n", octr.get()->stateChangeCounter++);
|
||||
#endif
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -577,7 +591,9 @@ void DisconSELECT()
|
||||
|
||||
// to go the lobby browser
|
||||
octr.get()->CurrState = -1;
|
||||
#ifdef PINE_DEBUG
|
||||
printf("statechange %d (-1) 14: pressed SELECT\n", octr.get()->stateChangeCounter++);
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -599,7 +615,9 @@ void StatePC_Launch_EnterPID()
|
||||
StopAnimation();
|
||||
printf("Client: Waiting to connect to a server... ");
|
||||
octr.get()->CurrState = LAUNCH_PICK_SERVER;
|
||||
#ifdef PINE_DEBUG
|
||||
printf("statechange %d LAUNCH_PICK_SERVER 15: \n", octr.get()->stateChangeCounter++);
|
||||
#endif
|
||||
}
|
||||
|
||||
void printUntilPeriod(const char* str)
|
||||
@ -865,7 +883,9 @@ void StatePC_Launch_PickServer()
|
||||
{
|
||||
// to go the country select
|
||||
octr.get()->CurrState = LAUNCH_PICK_SERVER;
|
||||
#ifdef PINE_DEBUG
|
||||
printf("statechange %d LAUNCH_PICK_SERVER 16: failed to connect to server due to exceeding max retries\n", octr.get()->stateChangeCounter++);
|
||||
#endif
|
||||
octr.get()->boolClientBusy = 0;
|
||||
//unlike the above call to blockingWrite() in this function for octr, I don't think this is
|
||||
//necessary, but I'm doing it to be safe.
|
||||
@ -882,7 +902,9 @@ void StatePC_Launch_PickServer()
|
||||
|
||||
octr.get()->DriverID = -1;
|
||||
octr.get()->CurrState = LAUNCH_PICK_ROOM;
|
||||
#ifdef PINE_DEBUG
|
||||
printf("statechange %d LAUNCH_PICK_SERVER 17: failed to connect to server due to disconnect\n", octr.get()->stateChangeCounter++);
|
||||
#endif
|
||||
octr.get()->boolClientBusy = 0;
|
||||
//unlike the above call to blockingWrite() in this function for octr, I don't think this is
|
||||
//necessary, but I'm doing it to be safe.
|
||||
@ -969,7 +991,9 @@ void StatePC_Lobby_HostTrackPick()
|
||||
sendToHostReliable(&mt, sizeof(CG_MessageTrack));
|
||||
|
||||
(octr.get())->CurrState = LOBBY_CHARACTER_PICK;
|
||||
#ifdef PINE_DEBUG
|
||||
printf("statechange %d LOBBY_CHARACTER_PICK 18: track selected\n", octr.get()->stateChangeCounter++);
|
||||
#endif
|
||||
}
|
||||
|
||||
int prev_characterID = -1;
|
||||
@ -1006,7 +1030,9 @@ void StatePC_Lobby_CharacterPick()
|
||||
if (mc.boolLockedIn == 1)
|
||||
{
|
||||
octr.get()->CurrState = LOBBY_WAIT_FOR_LOADING;
|
||||
#ifdef PINE_DEBUG
|
||||
printf("statechange %d LOBBY_WAIT_FOR_LOADING 19: waiting for game load\n", octr.get()->stateChangeCounter++);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user