Comment tweaks, updated network version

This commit is contained in:
Kayne Ruse
2015-02-14 23:54:18 +11:00
parent 18b144fa46
commit 87af4f1a1e
13 changed files with 32 additions and 27 deletions
+1 -1
View File
@@ -24,7 +24,7 @@
#include "config_utility.hpp" #include "config_utility.hpp"
void BaseMonster::CorrectSprite() { void BaseMonster::CorrectSprite() {
//TODO: (1) CorrectSprite //TODO: (9) empty
} }
std::string BaseMonster::SetHandle(std::string s) { std::string BaseMonster::SetHandle(std::string s) {
+1 -1
View File
@@ -156,7 +156,7 @@ protected:
LocalCharacter* localCharacter = nullptr; LocalCharacter* localCharacter = nullptr;
//heartbeat //heartbeat
//TODO: (9) Heartbeat needs it's own utility //TODO: (2) Heartbeat needs it's own utility
typedef std::chrono::steady_clock Clock; typedef std::chrono::steady_clock Clock;
Clock::time_point lastBeat = Clock::now(); Clock::time_point lastBeat = Clock::now();
int attemptedBeats = 0; int attemptedBeats = 0;
+4 -4
View File
@@ -128,11 +128,11 @@ void World::hQueryCharacterExists(CharacterPacket* const argPacket) {
} }
void World::hQueryCharacterStats(CharacterPacket* const argPacket) { void World::hQueryCharacterStats(CharacterPacket* const argPacket) {
//TODO: empty //TODO: (9) empty
} }
void World::hQueryCharacterLocation(CharacterPacket* const argPacket) { void World::hQueryCharacterLocation(CharacterPacket* const argPacket) {
//TODO: empty //TODO: (9) empty
} }
void World::hCharacterMovement(CharacterPacket* const argPacket) { void World::hCharacterMovement(CharacterPacket* const argPacket) {
@@ -152,11 +152,11 @@ void World::hCharacterMovement(CharacterPacket* const argPacket) {
} }
void World::hCharacterAttack(CharacterPacket* const argPacket) { void World::hCharacterAttack(CharacterPacket* const argPacket) {
//TODO: (1) attack animation //TODO: (9) empty
} }
void World::hCharacterDamage(CharacterPacket* const argPacket) { void World::hCharacterDamage(CharacterPacket* const argPacket) {
//TODO: (1) attack animation //TODO: (9) empty
} }
//------------------------- //-------------------------
+3 -3
View File
@@ -26,14 +26,14 @@
//------------------------- //-------------------------
void World::hTextBroadcast(TextPacket* const argPacket) { void World::hTextBroadcast(TextPacket* const argPacket) {
//TODO: (1) empty //TODO: (9) empty
} }
void World::hTextSpeech(TextPacket* const argPacket) { void World::hTextSpeech(TextPacket* const argPacket) {
//TODO: (1) empty //TODO: (9) empty
} }
void World::hTextWhisper(TextPacket* const argPacket) { void World::hTextWhisper(TextPacket* const argPacket) {
//TODO: (1) empty //TODO: (9) empty
} }
+1 -1
View File
@@ -91,7 +91,7 @@ void World::SendDisconnectRequest() {
} }
void World::SendAdminDisconnectForced() { void World::SendAdminDisconnectForced() {
//TODO: empty //TODO: (9) empty
} }
+2 -2
View File
@@ -60,7 +60,7 @@ World::World(int* const argClientIndex, int* const argAccountIndex):
shutDownButton.SetText("Shut Down"); shutDownButton.SetText("Shut Down");
//load the tilesheet //load the tilesheet
//TODO: (9) Tile size and tile sheet should be loaded elsewhere //TODO: (1) Tile size and tile sheet should be loaded elsewhere
tileSheet.Load(config["dir.tilesets"] + "overworld.bmp", 32, 32); tileSheet.Load(config["dir.tilesets"] + "overworld.bmp", 32, 32);
//Send the character data //Send the character data
@@ -221,7 +221,7 @@ void World::KeyDown(SDL_KeyboardEvent const& key) {
//hotkeys //hotkeys
switch(key.keysym.sym) { switch(key.keysym.sym) {
case SDLK_ESCAPE: case SDLK_ESCAPE:
//TODO: (9) the escape key should actually control menus and stuff //TODO: (1) the escape key should actually control menus and stuff
SendLogoutRequest(); SendLogoutRequest();
return; return;
} }
+4 -4
View File
@@ -99,11 +99,11 @@ void World::hQueryMonsterExists(MonsterPacket* const argPacket) {
} }
void World::hQueryMonsterStats(MonsterPacket* const argPacket) { void World::hQueryMonsterStats(MonsterPacket* const argPacket) {
//TODO: empty //TODO: (9) empty
} }
void World::hQueryMonsterLocation(MonsterPacket* const argPacket) { void World::hQueryMonsterLocation(MonsterPacket* const argPacket) {
//TODO: empty //TODO: (9) empty
} }
void World::hMonsterMovement(MonsterPacket* const argPacket) { void World::hMonsterMovement(MonsterPacket* const argPacket) {
@@ -118,9 +118,9 @@ void World::hMonsterMovement(MonsterPacket* const argPacket) {
} }
void World::hMonsterAttack(MonsterPacket* const argPacket) { void World::hMonsterAttack(MonsterPacket* const argPacket) {
//TODO: (1) HandleMonsterAttack //TODO: (9) empty
} }
void World::hMonsterDamage(MonsterPacket* const argPacket) { void World::hMonsterDamage(MonsterPacket* const argPacket) {
//TODO: (1) empty //TODO: (9) empty
} }
+4 -4
View File
@@ -100,14 +100,14 @@ void LobbyMenu::FrameEnd() {
} }
void LobbyMenu::Render(SDL_Surface* const screen) { void LobbyMenu::Render(SDL_Surface* const screen) {
//TODO: (9) I need a proper UI system for the entire client and the editor //TODO: (2) I need a proper UI system for the entire client and the editor
//UI //UI
search.DrawTo(screen); search.DrawTo(screen);
join.DrawTo(screen); join.DrawTo(screen);
back.DrawTo(screen); back.DrawTo(screen);
//TODO: (9) draw headers for the server list //TODO: (1) draw headers for the server list
for (int i = 0; i < serverInfo.size(); i++) { for (int i = 0; i < serverInfo.size(); i++) {
//draw the selected server's highlight //draw the selected server's highlight
if (selection == &serverInfo[i]) { if (selection == &serverInfo[i]) {
@@ -252,11 +252,11 @@ void LobbyMenu::HandleLoginResponse(ClientPacket* const argPacket) {
} }
void LobbyMenu::HandleJoinRejection(TextPacket* const argPacket) { void LobbyMenu::HandleJoinRejection(TextPacket* const argPacket) {
//TODO: (9) Better output for join rejection //TODO: (9) empty
} }
void LobbyMenu::HandleLoginRejection(TextPacket* const argPacket) { void LobbyMenu::HandleLoginRejection(TextPacket* const argPacket) {
//TODO: (9) Better output for login rejection //TODO: (9) empty
} }
//------------------------- //-------------------------
+1 -1
View File
@@ -108,7 +108,7 @@ void MainMenu::MouseButtonDown(SDL_MouseButtonEvent const& button) {
} }
void MainMenu::MouseButtonUp(SDL_MouseButtonEvent const& button) { void MainMenu::MouseButtonUp(SDL_MouseButtonEvent const& button) {
//TODO: (9) Buttons should only register as "selected" when the left button is used //TODO: (2) Buttons should only register as "selected" when the left button is used
if (startButton.MouseButtonUp(button) == Button::State::HOVER) { if (startButton.MouseButtonUp(button) == Button::State::HOVER) {
SetNextScene(SceneList::LOBBYMENU); SetNextScene(SceneList::LOBBYMENU);
} }
+1 -1
View File
@@ -34,7 +34,7 @@
typedef SerialPacketBase SerialPacket; typedef SerialPacketBase SerialPacket;
//DOCS: NETWORK_VERSION is used to discern compatible servers and clients //DOCS: NETWORK_VERSION is used to discern compatible servers and clients
constexpr int NETWORK_VERSION = 20150213; constexpr int NETWORK_VERSION = 20150214;
union MaxPacket { union MaxPacket {
CharacterPacket a; CharacterPacket a;
+3 -3
View File
@@ -175,7 +175,7 @@ void ServerApplication::hCharacterUnload(CharacterPacket* const argPacket) {
//character movement //character movement
//------------------------- //-------------------------
//TODO: (9) Could replace this verbosity with a "verify" method, taking a client, account and character ptr as arguments //TODO: (2) Could replace this verbosity with a "verify" method, taking a client, account and character ptr as arguments
void ServerApplication::hCharacterMovement(CharacterPacket* const argPacket) { void ServerApplication::hCharacterMovement(CharacterPacket* const argPacket) {
//get the specified objects //get the specified objects
@@ -197,7 +197,7 @@ void ServerApplication::hCharacterMovement(CharacterPacket* const argPacket) {
//check if allowed //check if allowed
if (characterData->GetOwner() != argPacket->accountIndex && !accountData->GetModerator() && !accountData->GetAdministrator()) { if (characterData->GetOwner() != argPacket->accountIndex && !accountData->GetModerator() && !accountData->GetAdministrator()) {
//TODO: (9) send to the client? //TODO: (2) send to the client?
std::cerr << "Failed to set character motion due to lack of permissions targeting uid(" << argPacket->characterIndex << ")" << std::endl; std::cerr << "Failed to set character motion due to lack of permissions targeting uid(" << argPacket->characterIndex << ")" << std::endl;
return; return;
} }
@@ -235,7 +235,7 @@ void ServerApplication::hCharacterMovement(CharacterPacket* const argPacket) {
} }
void ServerApplication::hCharacterAttack(CharacterPacket* const argPacket) { void ServerApplication::hCharacterAttack(CharacterPacket* const argPacket) {
//TODO: (9) bounce graphical attack data //TODO: (9) empty
} }
void ServerApplication::hCharacterDamage(CharacterPacket* const argPacket) { void ServerApplication::hCharacterDamage(CharacterPacket* const argPacket) {
+2 -1
View File
@@ -194,7 +194,8 @@ void ServerApplication::Proc() {
void ServerApplication::Quit() { void ServerApplication::Quit() {
std::cout << "Shutting down" << std::endl; std::cout << "Shutting down" << std::endl;
//TODO: (9) save the server state //save the server state
SaveServerState();
//close the managers //close the managers
accountMgr.UnloadAll(); accountMgr.UnloadAll();
+5 -1
View File
@@ -30,7 +30,7 @@
//------------------------- //-------------------------
void ServerApplication::hAdminDisconnectForced(ClientPacket* const argPacket) { void ServerApplication::hAdminDisconnectForced(ClientPacket* const argPacket) {
//TODO: (9) boot players //TODO: (9) empty
} }
void ServerApplication::hAdminShutdownRequest(ClientPacket* const argPacket) { void ServerApplication::hAdminShutdownRequest(ClientPacket* const argPacket) {
@@ -84,6 +84,10 @@ void ServerApplication::hAdminShutdownRequest(ClientPacket* const argPacket) {
std::cout << "Shutdown signal accepted" << std::endl; std::cout << "Shutdown signal accepted" << std::endl;
} }
void ServerApplication::SaveServerState() {
//TODO: (9) empty
}
//------------------------- //-------------------------
//full unload methods //full unload methods
//------------------------- //-------------------------