Adjusted a few comments

This commit is contained in:
Kayne Ruse
2014-04-21 02:13:00 +10:00
parent 60edc97ea5
commit 6c6a025f2a
7 changed files with 11 additions and 9 deletions
+1 -1
View File
@@ -453,7 +453,7 @@ int InWorld::CheckBufferDistance(Region* const region) {
return std::max(abs(x), abs(y));
}
//TODO: eew ugly
//TODO: Revise InWorld::UpdateMap() after InWorld::CheckBufferDistance()
void InWorld::UpdateMap() {
//prune distant regions
for (auto it = regionPager.GetContainer()->begin(); it != regionPager.GetContainer()->end(); /* EMPTY */) {
+1
View File
@@ -155,6 +155,7 @@ void LobbyMenu::MouseButtonUp(SDL_MouseButtonEvent const& button) {
}
else if (join.MouseButtonUp(button) == Button::State::HOVER && selection != nullptr && selection->compatible) {
//TODO: The player login information should be collected by the lobby screen
//the vars
SerialPacket packet;
char buffer[PACKET_BUFFER_SIZE];
+1 -1
View File
@@ -46,7 +46,7 @@ public:
virtual Region* SaveRegion(int x, int y) = 0;
virtual Region* CreateRegion(int x, int y) = 0;
virtual void UnloadRegion(int x, int y) = 0;
//TODO: delete?
//TODO: delete existing regions
//accessors & mutators
std::list<Region*>* GetContainer() { return &regionList; }
+1 -1
View File
@@ -24,7 +24,7 @@
#include "serial_packet.hpp"
/* TODO: Keep the PACKET_BUFFER_SIZE up to date
/* NOTE: Keep the PACKET_BUFFER_SIZE up to date
* NOTE: REGION_CONTENT is currently the largest type of packet
* map content: REGION_WIDTH * REGION_HEIGHT * REGION_DEPTH * sizoeof(region::type_t)
* map format: sizeof(int) * 2
+1 -2
View File
@@ -99,8 +99,7 @@ union SerialPacket {
Metadata meta;
int clientIndex;
int playerIndex;
//TODO: should probably move these into the client info
//TODO: these might actually do better during the login system
//TODO: should move handle/avatar into clientInfo; these might actually do better during the login system
char handle[PACKET_STRING_SIZE];
char avatar[PACKET_STRING_SIZE];
Vector2 position;
+5 -3
View File
@@ -110,7 +110,7 @@ void ServerApplication::Proc() {
HandlePacket(packet);
}
//give the computer a break
//TODO: remove this?
//TODO: remove this delay?
SDL_Delay(10);
}
}
@@ -252,7 +252,7 @@ void ServerApplication::HandleSynchronize(SerialPacket packet) {
SerialPacket newPacket;
char buffer[PACKET_BUFFER_SIZE];
//TODO: map?
//TODO: syncronize the map?
//players
newPacket.meta.type = SerialPacket::Type::PLAYER_UPDATE;
@@ -314,13 +314,15 @@ void ServerApplication::HandlePlayerNew(SerialPacket packet) {
PlayerEntry::uidCounter++;
}
//TODO: differentiate between delete and unload
void ServerApplication::HandlePlayerDelete(SerialPacket packet) {
//TODO: remove this?
//TODO: authenticate who is deleting this player
if (playerMap.find(packet.playerInfo.playerIndex) == playerMap.end()) {
throw(std::runtime_error("Cannot delete a non-existant player"));
}
//TODO: remove the deleted player from the database?
//prep the delete packet
SerialPacket delPacket;
delPacket.meta.type = SerialPacket::Type::PLAYER_DELETE;
+1 -1
View File
@@ -74,7 +74,7 @@ private:
void HandlePlayerUpdate(SerialPacket);
void HandleRegionRequest(SerialPacket);
//TODO: a function that sends to players in a certain proximity
//TODO: a function that only sends to players in a certain proximity
void PumpPacket(SerialPacket);
//APIs