Project modernization (#630)

* Fixed boats falling and a TP glitch #266

* Replaced every C-style cast with C++ ones

* Replaced every C-style cast with C++ ones

* Fixed boats falling and a TP glitch #266

* Updated NULL to nullptr and fixing some type issues

* Modernized and fixed a few bugs

- Replaced most instances of `NULL` with `nullptr`.
- Replaced most `shared_ptr(new ...)` with `make_shared`.
- Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances.

* Fixing more conflicts

* Replace int loops with size_t and start work on overrides
This commit is contained in:
ModMaker101
2026-03-07 21:56:03 -05:00
committed by GitHub
parent 1be5faaea7
commit a9be52c41a
1373 changed files with 19903 additions and 19449 deletions

View File

@@ -279,12 +279,12 @@ void SQRNetworkPlayer::SendInternal(const void *data, unsigned int dataSize, Ack
{
// no data, just the flag
assert(dataSize == 0);
assert(data == NULL);
assert(data == nullptr);
int dataSize = dataRemaining;
if( dataSize > SNP_MAX_PAYLOAD ) dataSize = SNP_MAX_PAYLOAD;
sendBlock.start = NULL;
sendBlock.end = NULL;
sendBlock.current = NULL;
sendBlock.start = nullptr;
sendBlock.end = nullptr;
sendBlock.current = nullptr;
sendBlock.ack = ackFlags;
m_sendQueue.push(sendBlock);
}
@@ -387,9 +387,9 @@ int SQRNetworkPlayer::ReadDataPacket(void* data, int dataSize)
unsigned char* packetData = new unsigned char[packetSize];
#ifdef __PS3__
int bytesRead = cellRudpRead( m_rudpCtx, packetData, packetSize, 0, NULL );
int bytesRead = cellRudpRead( m_rudpCtx, packetData, packetSize, 0, nullptr );
#else // __ORBIS__ && __PSVITA__
int bytesRead = sceRudpRead( m_rudpCtx, packetData, packetSize, 0, NULL );
int bytesRead = sceRudpRead( m_rudpCtx, packetData, packetSize, 0, nullptr );
#endif
if(bytesRead == sc_wouldBlockFlag)
{
@@ -426,9 +426,9 @@ void SQRNetworkPlayer::ReadAck()
{
DataPacketHeader header;
#ifdef __PS3__
int bytesRead = cellRudpRead( m_rudpCtx, &header, sizeof(header), 0, NULL );
int bytesRead = cellRudpRead( m_rudpCtx, &header, sizeof(header), 0, nullptr );
#else // __ORBIS__ && __PSVITA__
int bytesRead = sceRudpRead( m_rudpCtx, &header, sizeof(header), 0, NULL );
int bytesRead = sceRudpRead( m_rudpCtx, &header, sizeof(header), 0, nullptr );
#endif
if(bytesRead == sc_wouldBlockFlag)
{
@@ -459,7 +459,7 @@ void SQRNetworkPlayer::ReadAck()
void SQRNetworkPlayer::WriteAck()
{
SendInternal(NULL, 0, e_flag_AckReturning);
SendInternal(nullptr, 0, e_flag_AckReturning);
}
int SQRNetworkPlayer::GetOutstandingAckCount()